diff --git a/src/lint/linter/__tests__/ArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLinterTestCase.php --- a/src/lint/linter/__tests__/ArcanistLinterTestCase.php +++ b/src/lint/linter/__tests__/ArcanistLinterTestCase.php @@ -64,8 +64,6 @@ $contents, array(null, null)); - $basename = basename($file); - if ($config) { $config = phutil_json_decode($config); } else { @@ -75,11 +73,16 @@ $config, array( 'config' => 'optional map', + 'filename' => 'optional string', 'path' => 'optional string', 'mode' => 'optional string', 'stopped' => 'optional bool', )); + $filename = coalesce( + idx($config, 'filename'), + basename($file)); + $exception = null; $after_lint = null; $messages = null; @@ -87,7 +90,7 @@ $caught_exception = false; try { - $tmp = new TempFile($basename); + $tmp = new TempFile($filename); Filesystem::writeFile($tmp, $data); $full_path = (string)$tmp; @@ -166,7 +169,7 @@ } $this->assertEqual(false, $caught_exception, $exception_message); - $this->compareLint($basename, $expect, $result); + $this->compareLint($filename, $expect, $result); $this->compareTransform($xform, $after_lint); }