Page MenuHomePhorge

D25073.1734664582.diff
No OneTemporary

D25073.1734664582.diff

diff --git a/scripts/__init_script__.php b/scripts/__init_script__.php
--- a/scripts/__init_script__.php
+++ b/scripts/__init_script__.php
@@ -1,3 +1,3 @@
<?php
-require_once dirname(dirname(__FILE__)).'/support/init/init-script.php';
+require_once dirname(__DIR__).'/support/init/init-script.php';
diff --git a/scripts/arcanist.php b/scripts/arcanist.php
--- a/scripts/arcanist.php
+++ b/scripts/arcanist.php
@@ -3,7 +3,7 @@
sanity_check_environment();
-require_once dirname(__FILE__).'/__init_script__.php';
+require_once __DIR__.'/__init_script__.php';
/**
* Adjust 'include_path' to add locations where we'll search for libraries.
@@ -15,7 +15,7 @@
*/
function arcanist_adjust_php_include_path() {
// The 'arcanist/' directory.
- $arcanist_dir = dirname(dirname(__FILE__));
+ $arcanist_dir = dirname(__DIR__);
// The parent directory of 'arcanist/'.
$parent_dir = dirname($arcanist_dir);
@@ -687,7 +687,7 @@
// especially bizarre, but it allows `arc` to be used in automation
// workflows more easily. For some context, see PHI13.
- $executing_directory = dirname(dirname(__FILE__));
+ $executing_directory = dirname(__DIR__);
$working_directory = dirname($location);
fwrite(
diff --git a/scripts/hgdaemon/hgdaemon_client.php b/scripts/hgdaemon/hgdaemon_client.php
--- a/scripts/hgdaemon/hgdaemon_client.php
+++ b/scripts/hgdaemon/hgdaemon_client.php
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-require_once dirname(dirname(__FILE__)).'/__init_script__.php';
+require_once dirname(__DIR__).'/__init_script__.php';
$args = new PhutilArgumentParser($argv);
$args->parseStandardArguments();
diff --git a/scripts/hgdaemon/hgdaemon_server.php b/scripts/hgdaemon/hgdaemon_server.php
--- a/scripts/hgdaemon/hgdaemon_server.php
+++ b/scripts/hgdaemon/hgdaemon_server.php
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-require_once dirname(dirname(__FILE__)).'/__init_script__.php';
+require_once dirname(__DIR__).'/__init_script__.php';
$args = new PhutilArgumentParser($argv);
$args->parseStandardArguments();
diff --git a/src/__phutil_library_init__.php b/src/__phutil_library_init__.php
--- a/src/__phutil_library_init__.php
+++ b/src/__phutil_library_init__.php
@@ -1,3 +1,3 @@
<?php
-require_once dirname(__FILE__).'/init/init-library.php';
+require_once __DIR__.'/init/init-library.php';
diff --git a/src/console/__tests__/PhutilConsoleWrapTestCase.php b/src/console/__tests__/PhutilConsoleWrapTestCase.php
--- a/src/console/__tests__/PhutilConsoleWrapTestCase.php
+++ b/src/console/__tests__/PhutilConsoleWrapTestCase.php
@@ -3,7 +3,7 @@
final class PhutilConsoleWrapTestCase extends PhutilTestCase {
public function testWrap() {
- $dir = dirname(__FILE__).'/wrap/';
+ $dir = __DIR__.'/wrap/';
$files = Filesystem::listDirectory($dir);
foreach ($files as $file) {
if (preg_match('/.txt$/', $file)) {
diff --git a/src/filesystem/__tests__/FileFinderTestCase.php b/src/filesystem/__tests__/FileFinderTestCase.php
--- a/src/filesystem/__tests__/FileFinderTestCase.php
+++ b/src/filesystem/__tests__/FileFinderTestCase.php
@@ -4,7 +4,7 @@
private function newFinder($directory = null) {
if (!$directory) {
- $directory = dirname(__FILE__).'/data';
+ $directory = __DIR__.'/data';
}
return id(new FileFinder($directory))
diff --git a/src/filesystem/__tests__/FilesystemTestCase.php b/src/filesystem/__tests__/FilesystemTestCase.php
--- a/src/filesystem/__tests__/FilesystemTestCase.php
+++ b/src/filesystem/__tests__/FilesystemTestCase.php
@@ -76,38 +76,38 @@
public function testWalkToRoot() {
$test_cases = array(
array(
- dirname(__FILE__).'/data/include_dir.txt/subdir.txt/test',
- dirname(__FILE__),
+ __DIR__.'/data/include_dir.txt/subdir.txt/test',
+ __DIR__,
array(
- dirname(__FILE__).'/data/include_dir.txt/subdir.txt/test',
- dirname(__FILE__).'/data/include_dir.txt/subdir.txt',
- dirname(__FILE__).'/data/include_dir.txt',
- dirname(__FILE__).'/data',
- dirname(__FILE__),
+ __DIR__.'/data/include_dir.txt/subdir.txt/test',
+ __DIR__.'/data/include_dir.txt/subdir.txt',
+ __DIR__.'/data/include_dir.txt',
+ __DIR__.'/data',
+ __DIR__,
),
),
array(
- dirname(__FILE__).'/data/include_dir.txt/subdir.txt',
- dirname(__FILE__),
+ __DIR__.'/data/include_dir.txt/subdir.txt',
+ __DIR__,
array(
- dirname(__FILE__).'/data/include_dir.txt/subdir.txt',
- dirname(__FILE__).'/data/include_dir.txt',
- dirname(__FILE__).'/data',
- dirname(__FILE__),
+ __DIR__.'/data/include_dir.txt/subdir.txt',
+ __DIR__.'/data/include_dir.txt',
+ __DIR__.'/data',
+ __DIR__,
),
),
'root and path are identical' => array(
- dirname(__FILE__),
- dirname(__FILE__),
+ __DIR__,
+ __DIR__,
array(
- dirname(__FILE__),
+ __DIR__,
),
),
'root is not an ancestor of path' => array(
- dirname(__FILE__),
- dirname(__FILE__).'/data/include_dir.txt/subdir.txt',
+ __DIR__,
+ __DIR__.'/data/include_dir.txt/subdir.txt',
array(),
),
@@ -143,27 +143,27 @@
$test_cases = array(
array(
__FILE__,
- dirname(__FILE__),
+ __DIR__,
true,
),
array(
- dirname(__FILE__),
- dirname(dirname(__FILE__)),
+ __DIR__,
+ dirname(__DIR__),
true,
),
array(
- dirname(__FILE__),
+ __DIR__,
phutil_get_library_root_for_path(__FILE__),
true,
),
array(
- dirname(dirname(__FILE__)),
- dirname(__FILE__),
+ dirname(__DIR__),
+ __DIR__,
false,
),
array(
- dirname(__FILE__).'/quack',
- dirname(__FILE__),
+ __DIR__.'/quack',
+ __DIR__,
false,
),
);
diff --git a/src/filesystem/memory/__tests__/ArcanistHostMemorySnapshotTestCase.php b/src/filesystem/memory/__tests__/ArcanistHostMemorySnapshotTestCase.php
--- a/src/filesystem/memory/__tests__/ArcanistHostMemorySnapshotTestCase.php
+++ b/src/filesystem/memory/__tests__/ArcanistHostMemorySnapshotTestCase.php
@@ -13,7 +13,7 @@
'meminfo_swap_duplicate.txt' => false,
);
- $test_dir = dirname(__FILE__).'/data/';
+ $test_dir = __DIR__.'/data/';
foreach ($test_cases as $test_file => $expect) {
$test_data = Filesystem::readFile($test_dir.$test_file);
diff --git a/src/init/init-library.php b/src/init/init-library.php
--- a/src/init/init-library.php
+++ b/src/init/init-library.php
@@ -1,6 +1,6 @@
<?php
-$src = dirname(__FILE__);
+$src = __DIR__;
require_once $src.'/lib/core.php';
require_once $src.'/lib/PhutilBootloader.php';
@@ -67,4 +67,4 @@
spl_autoload_register('__phutil_autoload', $throw = true);
-PhutilBootloader::newLibrary('arcanist', dirname(dirname(__FILE__)));
+PhutilBootloader::newLibrary('arcanist', dirname(__DIR__));
diff --git a/src/lexer/__tests__/PhutilPHPFragmentLexerTestCase.php b/src/lexer/__tests__/PhutilPHPFragmentLexerTestCase.php
--- a/src/lexer/__tests__/PhutilPHPFragmentLexerTestCase.php
+++ b/src/lexer/__tests__/PhutilPHPFragmentLexerTestCase.php
@@ -3,7 +3,7 @@
final class PhutilPHPFragmentLexerTestCase extends PhutilTestCase {
public function testPHPFragmentLexer() {
- $dir = dirname(__FILE__).'/php';
+ $dir = __DIR__.'/php';
foreach (Filesystem::listDirectory($dir, $hidden = false) as $file) {
$data = Filesystem::readFile($dir.'/'.$file);
$this->runLexer($file, $data);
diff --git a/src/lexer/__tests__/PhutilShellLexerTestCase.php b/src/lexer/__tests__/PhutilShellLexerTestCase.php
--- a/src/lexer/__tests__/PhutilShellLexerTestCase.php
+++ b/src/lexer/__tests__/PhutilShellLexerTestCase.php
@@ -3,7 +3,7 @@
final class PhutilShellLexerTestCase extends PhutilTestCase {
public function testShellLexer() {
- $dir = dirname(__FILE__).'/shell';
+ $dir = __DIR__.'/shell';
foreach (Filesystem::listDirectory($dir, $hidden = false) as $file) {
$data = Filesystem::readFile($dir.'/'.$file);
$data = rtrim($data, "\n");
diff --git a/src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/csslint/');
+ $this->executeTestsInDirectory(__DIR__.'/csslint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistChmodLinterTestCase.php b/src/lint/linter/__tests__/ArcanistChmodLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistChmodLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistChmodLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistChmodLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/chmod/');
+ $this->executeTestsInDirectory(__DIR__.'/chmod/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php b/src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php
@@ -10,7 +10,7 @@
}
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/gjslint/');
+ $this->executeTestsInDirectory(__DIR__.'/gjslint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/coffeelint/');
+ $this->executeTestsInDirectory(__DIR__.'/coffeelint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/cppcheck/');
+ $this->executeTestsInDirectory(__DIR__.'/cppcheck/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/cpplint/');
+ $this->executeTestsInDirectory(__DIR__.'/cpplint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistFilenameLinterTestCase.php b/src/lint/linter/__tests__/ArcanistFilenameLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistFilenameLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistFilenameLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistFilenameLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/filename/');
+ $this->executeTestsInDirectory(__DIR__.'/filename/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php b/src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/flake8/');
+ $this->executeTestsInDirectory(__DIR__.'/flake8/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistGeneratedLinterTestCase.php b/src/lint/linter/__tests__/ArcanistGeneratedLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistGeneratedLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistGeneratedLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistGeneratedLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- return $this->executeTestsInDirectory(dirname(__FILE__).'/generated/');
+ return $this->executeTestsInDirectory(__DIR__.'/generated/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/golint/');
+ $this->executeTestsInDirectory(__DIR__.'/golint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistHLintLinterTestCase extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/hlint/');
+ $this->executeTestsInDirectory(__DIR__.'/hlint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/jshint/');
+ $this->executeTestsInDirectory(__DIR__.'/jshint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php b/src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistJSONLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/json/');
+ $this->executeTestsInDirectory(__DIR__.'/json/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php b/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistJscsLinterTestCase extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/jscs/');
+ $this->executeTestsInDirectory(__DIR__.'/jscs/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistLesscLinterTestCase extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/lessc/');
+ $this->executeTestsInDirectory(__DIR__.'/lessc/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php b/src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistMergeConflictLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/mergeconflict/');
+ $this->executeTestsInDirectory(__DIR__.'/mergeconflict/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistNoLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistNoLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistNoLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistNoLintLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistNoLintLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/nolint/');
+ $this->executeTestsInDirectory(__DIR__.'/nolint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php b/src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistPEP8LinterTestCase extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/pep8/');
+ $this->executeTestsInDirectory(__DIR__.'/pep8/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistPhpLinterTestCase extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/php/');
+ $this->executeTestsInDirectory(__DIR__.'/php/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistPhpcsLinterTestCase extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/phpcs/');
+ $this->executeTestsInDirectory(__DIR__.'/phpcs/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/puppet-lint/');
+ $this->executeTestsInDirectory(__DIR__.'/puppet-lint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/pyflakes/');
+ $this->executeTestsInDirectory(__DIR__.'/pyflakes/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/pylint/');
+ $this->executeTestsInDirectory(__DIR__.'/pylint/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistRuboCopLinterTestCase.php b/src/lint/linter/__tests__/ArcanistRuboCopLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistRuboCopLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistRuboCopLinterTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/rubocop/');
+ $this->executeTestsInDirectory(__DIR__.'/rubocop/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php b/src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistRubyLinterTestCase extends ArcanistExternalLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/ruby/');
+ $this->executeTestsInDirectory(__DIR__.'/ruby/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php b/src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
@@ -9,7 +9,7 @@
}
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/spelling/');
+ $this->executeTestsInDirectory(__DIR__.'/spelling/');
}
public function testFixLetterCase() {
diff --git a/src/lint/linter/__tests__/ArcanistTextLinterTestCase.php b/src/lint/linter/__tests__/ArcanistTextLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistTextLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistTextLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistTextLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/text/');
+ $this->executeTestsInDirectory(__DIR__.'/text/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php b/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistXHPASTLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/xhpast/');
+ $this->executeTestsInDirectory(__DIR__.'/xhpast/');
}
}
diff --git a/src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php b/src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php
@@ -7,7 +7,7 @@
final class ArcanistXMLLinterTestCase extends ArcanistLinterTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/xml/');
+ $this->executeTestsInDirectory(__DIR__.'/xml/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractMethodBodyXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractMethodBodyXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractMethodBodyXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractMethodBodyXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/abstract-method-body/');
+ $this->executeTestsInDirectory(__DIR__.'/abstract-method-body/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractPrivateMethodXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractPrivateMethodXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractPrivateMethodXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistAbstractPrivateMethodXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/abstract-private-method/');
+ __DIR__.'/abstract-private-method/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistAliasFunctionXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistAliasFunctionXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistAliasFunctionXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistAliasFunctionXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/alias-functions/');
+ $this->executeTestsInDirectory(__DIR__.'/alias-functions/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayCombineXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayCombineXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayCombineXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayCombineXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/array-combine/');
+ $this->executeTestsInDirectory(__DIR__.'/array-combine/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayIndexSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayIndexSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayIndexSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayIndexSpacingXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/array-index-spacing/');
+ $this->executeTestsInDirectory(__DIR__.'/array-index-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistArraySeparatorXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistArraySeparatorXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistArraySeparatorXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistArraySeparatorXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/array-separator/');
+ $this->executeTestsInDirectory(__DIR__.'/array-separator/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayValueXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayValueXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayValueXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistArrayValueXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/array-value/');
+ $this->executeTestsInDirectory(__DIR__.'/array-value/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistBinaryExpressionSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistBinaryExpressionSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistBinaryExpressionSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistBinaryExpressionSpacingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/binary-expression-spacing/');
+ __DIR__.'/binary-expression-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistBinaryNumericScalarCasingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistBinaryNumericScalarCasingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistBinaryNumericScalarCasingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistBinaryNumericScalarCasingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/binary-numeric-scalar-casing/');
+ __DIR__.'/binary-numeric-scalar-casing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistBlacklistedFunctionXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistBlacklistedFunctionXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistBlacklistedFunctionXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistBlacklistedFunctionXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/blacklisted-function/');
+ $this->executeTestsInDirectory(__DIR__.'/blacklisted-function/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistBraceFormattingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistBraceFormattingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistBraceFormattingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistBraceFormattingXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/brace-formatting/');
+ $this->executeTestsInDirectory(__DIR__.'/brace-formatting/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistCallParenthesesXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistCallParenthesesXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistCallParenthesesXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistCallParenthesesXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/call-parentheses/');
+ $this->executeTestsInDirectory(__DIR__.'/call-parentheses/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistCallTimePassByReferenceXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistCallTimePassByReferenceXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistCallTimePassByReferenceXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistCallTimePassByReferenceXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/call-time-pass-by-reference/');
+ __DIR__.'/call-time-pass-by-reference/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistCastSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistCastSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistCastSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistCastSpacingXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/cast-spacing/');
+ $this->executeTestsInDirectory(__DIR__.'/cast-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistClassExtendsObjectXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistClassExtendsObjectXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistClassExtendsObjectXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistClassExtendsObjectXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/class-extends-object/');
+ $this->executeTestsInDirectory(__DIR__.'/class-extends-object/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistClassMustBeDeclaredAbstractXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistClassMustBeDeclaredAbstractXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistClassMustBeDeclaredAbstractXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistClassMustBeDeclaredAbstractXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/class-must-be-declared-abstract/');
+ __DIR__.'/class-must-be-declared-abstract/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistClassNameLiteralXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistClassNameLiteralXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistClassNameLiteralXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistClassNameLiteralXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/class-name-literal/');
+ $this->executeTestsInDirectory(__DIR__.'/class-name-literal/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistCommentStyleXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistCommentStyleXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistCommentStyleXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistCommentStyleXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/comment-style/');
+ $this->executeTestsInDirectory(__DIR__.'/comment-style/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistConcatenationOperatorXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistConcatenationOperatorXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistConcatenationOperatorXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistConcatenationOperatorXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/concatenation-operator/');
+ __DIR__.'/concatenation-operator/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistConstructorParenthesesXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistConstructorParenthesesXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistConstructorParenthesesXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistConstructorParenthesesXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/constructor-parentheses/');
+ __DIR__.'/constructor-parentheses/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistContinueInsideSwitchXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistContinueInsideSwitchXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistContinueInsideSwitchXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistContinueInsideSwitchXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/continue-inside-switch/');
+ __DIR__.'/continue-inside-switch/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistControlStatementSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistControlStatementSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistControlStatementSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistControlStatementSpacingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/control-statement-spacing/');
+ __DIR__.'/control-statement-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistCurlyBraceArrayIndexXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistCurlyBraceArrayIndexXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistCurlyBraceArrayIndexXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistCurlyBraceArrayIndexXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/curly-brace-array-index/');
+ __DIR__.'/curly-brace-array-index/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistDeclarationParenthesesXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistDeclarationParenthesesXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistDeclarationParenthesesXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistDeclarationParenthesesXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/declaration-parentheses/');
+ __DIR__.'/declaration-parentheses/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistDefaultParametersXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistDefaultParametersXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistDefaultParametersXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistDefaultParametersXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/default-parameters/');
+ $this->executeTestsInDirectory(__DIR__.'/default-parameters/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistDeprecationXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistDeprecationXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistDeprecationXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistDeprecationXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/deprecation/');
+ $this->executeTestsInDirectory(__DIR__.'/deprecation/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistDoubleQuoteXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistDoubleQuoteXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistDoubleQuoteXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistDoubleQuoteXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/double-quote/');
+ $this->executeTestsInDirectory(__DIR__.'/double-quote/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistDuplicateKeysInArrayXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistDuplicateKeysInArrayXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistDuplicateKeysInArrayXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistDuplicateKeysInArrayXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/duplicate-keys-in-array/');
+ __DIR__.'/duplicate-keys-in-array/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistDuplicateSwitchCaseXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistDuplicateSwitchCaseXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistDuplicateSwitchCaseXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistDuplicateSwitchCaseXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/duplicate-switch-case/');
+ $this->executeTestsInDirectory(__DIR__.'/duplicate-switch-case/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistDynamicDefineXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistDynamicDefineXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistDynamicDefineXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistDynamicDefineXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/dynamic-define/');
+ $this->executeTestsInDirectory(__DIR__.'/dynamic-define/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistEachUseXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistEachUseXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistEachUseXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistEachUseXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/each-use/');
+ $this->executeTestsInDirectory(__DIR__.'/each-use/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistElseIfUsageXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistElseIfUsageXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistElseIfUsageXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistElseIfUsageXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/elseif-usage/');
+ $this->executeTestsInDirectory(__DIR__.'/elseif-usage/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistEmptyStatementXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistEmptyStatementXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistEmptyStatementXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistEmptyStatementXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/empty-statement/');
+ $this->executeTestsInDirectory(__DIR__.'/empty-statement/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistExitExpressionXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistExitExpressionXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistExitExpressionXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistExitExpressionXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/exit-expression/');
+ $this->executeTestsInDirectory(__DIR__.'/exit-expression/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistExtractUseXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistExtractUseXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistExtractUseXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistExtractUseXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/extract-use/');
+ $this->executeTestsInDirectory(__DIR__.'/extract-use/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistFormattedStringXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistFormattedStringXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistFormattedStringXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistFormattedStringXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/formatted-string/');
+ $this->executeTestsInDirectory(__DIR__.'/formatted-string/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/function-call-should-be-type-cast/');
+ __DIR__.'/function-call-should-be-type-cast/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistGlobalVariableXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistGlobalVariableXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistGlobalVariableXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistGlobalVariableXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/global-variable/');
+ $this->executeTestsInDirectory(__DIR__.'/global-variable/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistHexadecimalNumericScalarCasingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistHexadecimalNumericScalarCasingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistHexadecimalNumericScalarCasingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistHexadecimalNumericScalarCasingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/hexadecimal-numeric-scalar-casing/');
+ __DIR__.'/hexadecimal-numeric-scalar-casing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitConstructorXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitConstructorXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitConstructorXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitConstructorXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/implicit-constructor/');
+ $this->executeTestsInDirectory(__DIR__.'/implicit-constructor/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitFallthroughXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitFallthroughXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitFallthroughXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitFallthroughXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/implicit-fallthrough/');
+ $this->executeTestsInDirectory(__DIR__.'/implicit-fallthrough/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitVisibilityXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitVisibilityXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitVisibilityXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistImplicitVisibilityXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/implicit-visibility/');
+ $this->executeTestsInDirectory(__DIR__.'/implicit-visibility/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistImplodeArgumentOrderXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistImplodeArgumentOrderXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistImplodeArgumentOrderXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistImplodeArgumentOrderXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/implode-argument-order/');
+ __DIR__.'/implode-argument-order/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistInlineHTMLXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistInlineHTMLXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistInlineHTMLXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistInlineHTMLXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/inline-html/');
+ $this->executeTestsInDirectory(__DIR__.'/inline-html/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistInnerFunctionXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistInnerFunctionXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistInnerFunctionXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistInnerFunctionXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/inner-function/');
+ $this->executeTestsInDirectory(__DIR__.'/inner-function/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistInstanceofOperatorXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistInstanceofOperatorXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistInstanceofOperatorXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistInstanceofOperatorXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/instanceof-operator/');
+ $this->executeTestsInDirectory(__DIR__.'/instanceof-operator/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceAbstractMethodXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceAbstractMethodXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceAbstractMethodXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceAbstractMethodXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/interface-abstract-method/');
+ __DIR__.'/interface-abstract-method/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceMethodBodyXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceMethodBodyXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceMethodBodyXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistInterfaceMethodBodyXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/interface-method-body/');
+ $this->executeTestsInDirectory(__DIR__.'/interface-method-body/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidDefaultParameterXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidDefaultParameterXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidDefaultParameterXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidDefaultParameterXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/invalid-default-parameter/');
+ __DIR__.'/invalid-default-parameter/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidModifiersXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidModifiersXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidModifiersXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidModifiersXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/invalid-modifiers/');
+ $this->executeTestsInDirectory(__DIR__.'/invalid-modifiers/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidOctalNumericScalarXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidOctalNumericScalarXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidOctalNumericScalarXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistInvalidOctalNumericScalarXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/invalid-octal-numeric-scalar/');
+ __DIR__.'/invalid-octal-numeric-scalar/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistIsAShouldBeInstanceOfXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistIsAShouldBeInstanceOfXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistIsAShouldBeInstanceOfXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistIsAShouldBeInstanceOfXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/is_a-should-be-instanceof/');
+ __DIR__.'/is_a-should-be-instanceof/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistKeywordCasingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistKeywordCasingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistKeywordCasingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistKeywordCasingXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/keyword-casing/');
+ $this->executeTestsInDirectory(__DIR__.'/keyword-casing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistLambdaFuncFunctionXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistLambdaFuncFunctionXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistLambdaFuncFunctionXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistLambdaFuncFunctionXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/__lambda_func-function/');
+ __DIR__.'/__lambda_func-function/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistLanguageConstructParenthesesXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistLanguageConstructParenthesesXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistLanguageConstructParenthesesXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistLanguageConstructParenthesesXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/language-construct-parentheses/');
+ __DIR__.'/language-construct-parentheses/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistListAssignmentXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistListAssignmentXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistListAssignmentXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistListAssignmentXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/list-assignment/');
+ $this->executeTestsInDirectory(__DIR__.'/list-assignment/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistLogicalOperatorsXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistLogicalOperatorsXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistLogicalOperatorsXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistLogicalOperatorsXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/logical-operators/');
+ $this->executeTestsInDirectory(__DIR__.'/logical-operators/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistLowercaseFunctionsXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistLowercaseFunctionsXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistLowercaseFunctionsXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistLowercaseFunctionsXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/lowercase-functions/');
+ $this->executeTestsInDirectory(__DIR__.'/lowercase-functions/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistModifierOrderingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistModifierOrderingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistModifierOrderingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistModifierOrderingXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/modifier-ordering/');
+ $this->executeTestsInDirectory(__DIR__.'/modifier-ordering/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistNamespaceFirstStatementXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistNamespaceFirstStatementXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistNamespaceFirstStatementXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistNamespaceFirstStatementXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/namespace-first-statement/');
+ __DIR__.'/namespace-first-statement/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistNamingConventionsXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistNamingConventionsXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistNamingConventionsXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistNamingConventionsXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/naming-conventions/');
+ $this->executeTestsInDirectory(__DIR__.'/naming-conventions/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistNestedNamespacesXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistNestedNamespacesXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistNestedNamespacesXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistNestedNamespacesXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/nested-namespaces/');
+ $this->executeTestsInDirectory(__DIR__.'/nested-namespaces/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistNewlineAfterOpenTagXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistNewlineAfterOpenTagXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistNewlineAfterOpenTagXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistNewlineAfterOpenTagXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/newline-after-open-tag/');
+ __DIR__.'/newline-after-open-tag/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistNoParentScopeXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistNoParentScopeXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistNoParentScopeXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistNoParentScopeXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/no-parent-scope/');
+ $this->executeTestsInDirectory(__DIR__.'/no-parent-scope/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistObjectOperatorSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistObjectOperatorSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistObjectOperatorSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistObjectOperatorSpacingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/object-operator-spacing/');
+ __DIR__.'/object-operator-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPCloseTagXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPCloseTagXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPCloseTagXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPCloseTagXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/php-close-tag/');
+ $this->executeTestsInDirectory(__DIR__.'/php-close-tag/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPCompatibilityXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPCompatibilityXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPCompatibilityXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPCompatibilityXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/php-compatibility/');
+ $this->executeTestsInDirectory(__DIR__.'/php-compatibility/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPEchoTagXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPEchoTagXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPEchoTagXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPEchoTagXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/php-echo-tag/');
+ $this->executeTestsInDirectory(__DIR__.'/php-echo-tag/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPOpenTagXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPOpenTagXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPOpenTagXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPOpenTagXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/php-open-tag/');
+ $this->executeTestsInDirectory(__DIR__.'/php-open-tag/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPShortTagXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPShortTagXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPShortTagXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPHPShortTagXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/php-short-tag/');
+ $this->executeTestsInDirectory(__DIR__.'/php-short-tag/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPaamayimNekudotayimSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPaamayimNekudotayimSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPaamayimNekudotayimSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPaamayimNekudotayimSpacingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/paamayim-nekudotayim-spacing/');
+ __DIR__.'/paamayim-nekudotayim-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistParentMemberReferenceXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistParentMemberReferenceXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistParentMemberReferenceXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistParentMemberReferenceXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/parent-member-references/');
+ __DIR__.'/parent-member-references/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistParenthesesSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistParenthesesSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistParenthesesSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistParenthesesSpacingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/parentheses-spacing/');
+ __DIR__.'/parentheses-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistParseStrUseXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistParseStrUseXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistParseStrUseXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistParseStrUseXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/parse_str-use/');
+ $this->executeTestsInDirectory(__DIR__.'/parse_str-use/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPartialCatchXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPartialCatchXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPartialCatchXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPartialCatchXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/partial-catch/');
+ $this->executeTestsInDirectory(__DIR__.'/partial-catch/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPlusOperatorOnStringsXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPlusOperatorOnStringsXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPlusOperatorOnStringsXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPlusOperatorOnStringsXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/plus-operator-on-strings/');
+ __DIR__.'/plus-operator-on-strings/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistPublicPropertyXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistPublicPropertyXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistPublicPropertyXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistPublicPropertyXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/public-property/');
+ $this->executeTestsInDirectory(__DIR__.'/public-property/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistRaggedClassTreeEdgeXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistRaggedClassTreeEdgeXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistRaggedClassTreeEdgeXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistRaggedClassTreeEdgeXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/ragged-classtree-edge/');
+ $this->executeTestsInDirectory(__DIR__.'/ragged-classtree-edge/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedAsIteratorXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedAsIteratorXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedAsIteratorXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedAsIteratorXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/reused-as-iterator/');
+ $this->executeTestsInDirectory(__DIR__.'/reused-as-iterator/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorReferenceXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorReferenceXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorReferenceXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorReferenceXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/reused-iterator-reference/');
+ __DIR__.'/reused-iterator-reference/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/reused-iterator/');
+ $this->executeTestsInDirectory(__DIR__.'/reused-iterator/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistSelfClassReferenceXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistSelfClassReferenceXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistSelfClassReferenceXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistSelfClassReferenceXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/self-class-reference/');
+ $this->executeTestsInDirectory(__DIR__.'/self-class-reference/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistSelfMemberReferenceXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistSelfMemberReferenceXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistSelfMemberReferenceXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistSelfMemberReferenceXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/self-member-reference/');
+ $this->executeTestsInDirectory(__DIR__.'/self-member-reference/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistSemicolonSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistSemicolonSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistSemicolonSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistSemicolonSpacingXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/semicolon-spacing/');
+ $this->executeTestsInDirectory(__DIR__.'/semicolon-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistSlownessXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistSlownessXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistSlownessXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistSlownessXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/slowness/');
+ $this->executeTestsInDirectory(__DIR__.'/slowness/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistStaticThisXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistStaticThisXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistStaticThisXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistStaticThisXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/static-this/');
+ $this->executeTestsInDirectory(__DIR__.'/static-this/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistTautologicalExpressionXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistTautologicalExpressionXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistTautologicalExpressionXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistTautologicalExpressionXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/tautological-expression/');
+ __DIR__.'/tautological-expression/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistThisReassignmentXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistThisReassignmentXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistThisReassignmentXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistThisReassignmentXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/this-reassignment/');
+ $this->executeTestsInDirectory(__DIR__.'/this-reassignment/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistToStringExceptionXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistToStringExceptionXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistToStringExceptionXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistToStringExceptionXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/__toString-exception/');
+ $this->executeTestsInDirectory(__DIR__.'/__toString-exception/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistTodoCommentXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistTodoCommentXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistTodoCommentXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistTodoCommentXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/todo-comment/');
+ $this->executeTestsInDirectory(__DIR__.'/todo-comment/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/unary-postfix-expression-spacing/');
+ __DIR__.'/unary-postfix-expression-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/unary-prefix-expression-spacing/');
+ __DIR__.'/unary-prefix-expression-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUndeclaredVariableXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUndeclaredVariableXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUndeclaredVariableXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUndeclaredVariableXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/undeclared-variable/');
+ $this->executeTestsInDirectory(__DIR__.'/undeclared-variable/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnexpectedReturnValueXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnexpectedReturnValueXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnexpectedReturnValueXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnexpectedReturnValueXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/unexpected-return-value/');
+ __DIR__.'/unexpected-return-value/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnnecessaryFinalModifierXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnnecessaryFinalModifierXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnnecessaryFinalModifierXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnnecessaryFinalModifierXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/unnecessary-final-modifier/');
+ __DIR__.'/unnecessary-final-modifier/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/unnecessary-symbol-alias/');
+ __DIR__.'/unnecessary-symbol-alias/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/unsafe-dynamic-string/');
+ $this->executeTestsInDirectory(__DIR__.'/unsafe-dynamic-string/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUseStatementNamespacePrefixXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUseStatementNamespacePrefixXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUseStatementNamespacePrefixXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUseStatementNamespacePrefixXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/use-statement-namespace-prefix/');
+ __DIR__.'/use-statement-namespace-prefix/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistUselessOverridingMethodXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistUselessOverridingMethodXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistUselessOverridingMethodXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistUselessOverridingMethodXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/useless-overriding-method/');
+ __DIR__.'/useless-overriding-method/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistVariableReferenceSpacingXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistVariableReferenceSpacingXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistVariableReferenceSpacingXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistVariableReferenceSpacingXHPASTLinterRuleTestCase.php
@@ -5,7 +5,7 @@
public function testLinter() {
$this->executeTestsInDirectory(
- dirname(__FILE__).'/variable-reference-spacing/');
+ __DIR__.'/variable-reference-spacing/');
}
}
diff --git a/src/lint/linter/xhpast/rules/__tests__/ArcanistVariableVariableXHPASTLinterRuleTestCase.php b/src/lint/linter/xhpast/rules/__tests__/ArcanistVariableVariableXHPASTLinterRuleTestCase.php
--- a/src/lint/linter/xhpast/rules/__tests__/ArcanistVariableVariableXHPASTLinterRuleTestCase.php
+++ b/src/lint/linter/xhpast/rules/__tests__/ArcanistVariableVariableXHPASTLinterRuleTestCase.php
@@ -4,7 +4,7 @@
extends ArcanistXHPASTLinterRuleTestCase {
public function testLinter() {
- $this->executeTestsInDirectory(dirname(__FILE__).'/variable-variable/');
+ $this->executeTestsInDirectory(__DIR__.'/variable-variable/');
}
}
diff --git a/src/lint/renderer/__tests__/ArcanistConsoleLintRendererTestCase.php b/src/lint/renderer/__tests__/ArcanistConsoleLintRendererTestCase.php
--- a/src/lint/renderer/__tests__/ArcanistConsoleLintRendererTestCase.php
+++ b/src/lint/renderer/__tests__/ArcanistConsoleLintRendererTestCase.php
@@ -228,7 +228,7 @@
}
private function readTestData($filename) {
- $path = dirname(__FILE__).'/data/'.$filename;
+ $path = __DIR__.'/data/'.$filename;
$data = Filesystem::readFile($path);
// If we find "~~~" at the end of the file, get rid of it and any whitespace
diff --git a/src/moduleutils/PhutilLibraryMapBuilder.php b/src/moduleutils/PhutilLibraryMapBuilder.php
--- a/src/moduleutils/PhutilLibraryMapBuilder.php
+++ b/src/moduleutils/PhutilLibraryMapBuilder.php
@@ -237,7 +237,7 @@
}
private static function newExtractSymbolsFuture(array $flags, array $paths) {
- $bin = dirname(__FILE__).'/../../support/lib/extract-symbols.php';
+ $bin = __DIR__.'/../../support/lib/extract-symbols.php';
return new ExecFuture(
'php -f %R -- --ugly %Ls -- %Ls',
diff --git a/src/parser/__tests__/ArcanistBundleTestCase.php b/src/parser/__tests__/ArcanistBundleTestCase.php
--- a/src/parser/__tests__/ArcanistBundleTestCase.php
+++ b/src/parser/__tests__/ArcanistBundleTestCase.php
@@ -7,7 +7,7 @@
}
private function getResourcePath($name) {
- return dirname(__FILE__).'/bundle/'.$name;
+ return __DIR__.'/bundle/'.$name;
}
private function loadDiff($old, $new) {
@@ -74,7 +74,7 @@
$this->assertSkipped(pht('This test is not supported under Windows.'));
}
- $archive = dirname(__FILE__).'/bundle.git.tgz';
+ $archive = __DIR__.'/bundle.git.tgz';
$fixture = PhutilDirectoryFixture::newFromArchive($archive);
$old_dir = getcwd();
@@ -95,7 +95,7 @@
}
private function runGitRepositoryTests(PhutilDirectoryFixture $fixture) {
- $patches = dirname(__FILE__).'/patches/';
+ $patches = __DIR__.'/patches/';
list($commits) = execx(
'git log --format=%s',
@@ -680,7 +680,7 @@
$data .= chr($ii);
}
- $expect = Filesystem::readFile(dirname(__FILE__).'/base85/expect1.txt');
+ $expect = Filesystem::readFile(__DIR__.'/base85/expect1.txt');
$this->assertBase85($expect, $data, pht('Byte Sequences'));
// This is just a large block of random binary data, it has no special
@@ -961,7 +961,7 @@
"\xf8\xb9\x6c\xaa\x3b\x37\xd1\x21\x42\x67\xec\xd6\x44\x55\x33".
"\xe8\x1d\xa4\x18\xf3\x73\x82\xb4\x50\x59\xc2\x34\x36\x05\xeb";
- $expect = Filesystem::readFile(dirname(__FILE__).'/base85/expect2.txt');
+ $expect = Filesystem::readFile(__DIR__.'/base85/expect2.txt');
$this->assertBase85($expect, $data, pht('Random Data'));
}
diff --git a/src/parser/__tests__/ArcanistDiffParserTestCase.php b/src/parser/__tests__/ArcanistDiffParserTestCase.php
--- a/src/parser/__tests__/ArcanistDiffParserTestCase.php
+++ b/src/parser/__tests__/ArcanistDiffParserTestCase.php
@@ -6,7 +6,7 @@
final class ArcanistDiffParserTestCase extends PhutilTestCase {
public function testParser() {
- $root = dirname(__FILE__).'/diff/';
+ $root = __DIR__.'/diff/';
foreach (Filesystem::listDirectory($root, $hidden = false) as $file) {
$this->parseDiff($root.$file);
}
diff --git a/src/parser/__tests__/PhutilDocblockParserTestCase.php b/src/parser/__tests__/PhutilDocblockParserTestCase.php
--- a/src/parser/__tests__/PhutilDocblockParserTestCase.php
+++ b/src/parser/__tests__/PhutilDocblockParserTestCase.php
@@ -6,7 +6,7 @@
final class PhutilDocblockParserTestCase extends PhutilTestCase {
public function testParser() {
- $root = dirname(__FILE__).'/docblock/';
+ $root = __DIR__.'/docblock/';
foreach (Filesystem::listDirectory($root, $hidden = false) as $file) {
$this->parseDocblock($root.$file);
}
diff --git a/src/parser/__tests__/PhutilEditorConfigTestCase.php b/src/parser/__tests__/PhutilEditorConfigTestCase.php
--- a/src/parser/__tests__/PhutilEditorConfigTestCase.php
+++ b/src/parser/__tests__/PhutilEditorConfigTestCase.php
@@ -100,7 +100,7 @@
}
private function getTestFile($path = null) {
- return dirname(__FILE__).'/editorconfig/'.$path;
+ return __DIR__.'/editorconfig/'.$path;
}
}
diff --git a/src/parser/__tests__/PhutilJSONParserTestCase.php b/src/parser/__tests__/PhutilJSONParserTestCase.php
--- a/src/parser/__tests__/PhutilJSONParserTestCase.php
+++ b/src/parser/__tests__/PhutilJSONParserTestCase.php
@@ -22,12 +22,12 @@
'{"test":"http:\/\/foo\\\\zomg"}'
=> array('test' => 'http://foo\\zomg'),
'["http:\/\/foo\\\\zomg"]' => array('http://foo\\zomg'),
- Filesystem::readFile(dirname(__FILE__).'/json/base64.json') => array(
+ Filesystem::readFile(__DIR__.'/json/base64.json') => array(
'action' => 'candidate.create',
'actionId' => '80653a26cc46357ff79ff83b47e27c3cb7a668bd',
'params' => array(
'attachments' => array(
- Filesystem::readFile(dirname(__FILE__).'/json/base64.data'),
+ Filesystem::readFile(__DIR__.'/json/base64.data'),
),
),
),
diff --git a/src/parser/__tests__/PhutilLanguageGuesserTestCase.php b/src/parser/__tests__/PhutilLanguageGuesserTestCase.php
--- a/src/parser/__tests__/PhutilLanguageGuesserTestCase.php
+++ b/src/parser/__tests__/PhutilLanguageGuesserTestCase.php
@@ -3,7 +3,7 @@
final class PhutilLanguageGuesserTestCase extends PhutilTestCase {
public function testGuessing() {
- $dir = dirname(__FILE__).'/languageguesser/';
+ $dir = __DIR__.'/languageguesser/';
foreach (Filesystem::listDirectory($dir, $hidden = false) as $test) {
$source = Filesystem::readFile($dir.$test);
diff --git a/src/parser/html/__tests__/PhutilHTMLParserTestCase.php b/src/parser/html/__tests__/PhutilHTMLParserTestCase.php
--- a/src/parser/html/__tests__/PhutilHTMLParserTestCase.php
+++ b/src/parser/html/__tests__/PhutilHTMLParserTestCase.php
@@ -5,7 +5,7 @@
public function testHTMLParser() {
- $root = dirname(__FILE__).'/data/';
+ $root = __DIR__.'/data/';
$tests = Filesystem::listDirectory($root, $include_hidden = false);
foreach ($tests as $test) {
diff --git a/src/parser/xhpast/__tests__/PHPASTParserTestCase.php b/src/parser/xhpast/__tests__/PHPASTParserTestCase.php
--- a/src/parser/xhpast/__tests__/PHPASTParserTestCase.php
+++ b/src/parser/xhpast/__tests__/PHPASTParserTestCase.php
@@ -12,7 +12,7 @@
}
}
- $dir = dirname(__FILE__).'/data/';
+ $dir = __DIR__.'/data/';
foreach (Filesystem::listDirectory($dir) as $file) {
if (preg_match('/\.test$/', $file)) {
$this->executeParserTest($file, $dir.$file);
diff --git a/src/parser/xhpast/api/__tests__/XHPASTNodeTestCase.php b/src/parser/xhpast/api/__tests__/XHPASTNodeTestCase.php
--- a/src/parser/xhpast/api/__tests__/XHPASTNodeTestCase.php
+++ b/src/parser/xhpast/api/__tests__/XHPASTNodeTestCase.php
@@ -28,7 +28,7 @@
}
public function testGetNamespace() {
- $dir = dirname(__FILE__).'/namespace/';
+ $dir = __DIR__.'/namespace/';
$files = id(new FileFinder($dir))
->withType('f')
->withSuffix('php.test')
diff --git a/src/parser/xhpast/bin/PhutilXHPASTBinary.php b/src/parser/xhpast/bin/PhutilXHPASTBinary.php
--- a/src/parser/xhpast/bin/PhutilXHPASTBinary.php
+++ b/src/parser/xhpast/bin/PhutilXHPASTBinary.php
@@ -97,9 +97,9 @@
*/
public static function getPath() {
if (phutil_is_windows()) {
- return dirname(__FILE__).'\\xhpast.exe';
+ return __DIR__.'\\xhpast.exe';
}
- return dirname(__FILE__).'/xhpast';
+ return __DIR__.'/xhpast';
}
/**
diff --git a/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php b/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php
--- a/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php
+++ b/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php
@@ -30,7 +30,7 @@
}
private function parseState($test) {
- $dir = dirname(__FILE__).'/state/';
+ $dir = __DIR__.'/state/';
$fixture = PhutilDirectoryFixture::newFromArchive($dir.'/'.$test);
$fixture_path = $fixture->getPath();
diff --git a/src/repository/parser/__tests__/ArcanistMercurialParserTestCase.php b/src/repository/parser/__tests__/ArcanistMercurialParserTestCase.php
--- a/src/repository/parser/__tests__/ArcanistMercurialParserTestCase.php
+++ b/src/repository/parser/__tests__/ArcanistMercurialParserTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistMercurialParserTestCase extends PhutilTestCase {
public function testParseAll() {
- $root = dirname(__FILE__).'/mercurial/';
+ $root = __DIR__.'/mercurial/';
foreach (Filesystem::listDirectory($root, $hidden = false) as $file) {
$this->parseData(
basename($file),
diff --git a/src/runtime/ArcanistRuntime.php b/src/runtime/ArcanistRuntime.php
--- a/src/runtime/ArcanistRuntime.php
+++ b/src/runtime/ArcanistRuntime.php
@@ -472,7 +472,7 @@
// especially bizarre, but it allows `arc` to be used in automation
// workflows more easily. For some context, see PHI13.
- $executing_directory = dirname(dirname(__FILE__));
+ $executing_directory = dirname(__DIR__);
$log->writeWarn(
pht('VERY META'),
diff --git a/src/unit/engine/__tests__/PhutilUnitTestEngineTestCase.php b/src/unit/engine/__tests__/PhutilUnitTestEngineTestCase.php
--- a/src/unit/engine/__tests__/PhutilUnitTestEngineTestCase.php
+++ b/src/unit/engine/__tests__/PhutilUnitTestEngineTestCase.php
@@ -134,24 +134,24 @@
'test directory' => array(
array(
- dirname(__FILE__),
+ __DIR__,
),
array(
// This is odd, but harmless.
- dirname(dirname(__FILE__)).'/__tests__/__tests__/',
+ dirname(__DIR__).'/__tests__/__tests__/',
- dirname(dirname(__FILE__)).'/__tests__/',
- dirname(dirname(dirname(__FILE__))).'/__tests__/',
+ dirname(__DIR__).'/__tests__/',
+ dirname(dirname(__DIR__)).'/__tests__/',
phutil_get_library_root('arcanist').'/__tests__/',
),
),
'normal directory' => array(
array(
- dirname(dirname(__FILE__)),
+ dirname(__DIR__),
),
array(
- dirname(dirname(__FILE__)).'/__tests__/',
- dirname(dirname(dirname(__FILE__))).'/__tests__/',
+ dirname(__DIR__).'/__tests__/',
+ dirname(dirname(__DIR__)).'/__tests__/',
phutil_get_library_root('arcanist').'/__tests__/',
),
),
diff --git a/src/unit/parser/__tests__/ArcanistGoTestResultParserTestCase.php b/src/unit/parser/__tests__/ArcanistGoTestResultParserTestCase.php
--- a/src/unit/parser/__tests__/ArcanistGoTestResultParserTestCase.php
+++ b/src/unit/parser/__tests__/ArcanistGoTestResultParserTestCase.php
@@ -7,7 +7,7 @@
public function testSingleTestCaseSuccessful() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.single-test-case-successful');
+ __DIR__.'/testresults/go.single-test-case-successful');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('subpackage_test.go', $stubbed_results);
@@ -25,7 +25,7 @@
public function testSingleTestCaseFailure() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.single-test-case-failure');
+ __DIR__.'/testresults/go.single-test-case-failure');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('subpackage_test.go', $stubbed_results);
@@ -41,7 +41,7 @@
public function testMultipleTestCasesSuccessful() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.multiple-test-cases-successful');
+ __DIR__.'/testresults/go.multiple-test-cases-successful');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('package', $stubbed_results);
@@ -62,7 +62,7 @@
public function testMultipleTestCasesFailure() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.multiple-test-cases-failure');
+ __DIR__.'/testresults/go.multiple-test-cases-failure');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('package', $stubbed_results);
@@ -84,7 +84,7 @@
public function testNonVerboseOutput() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.nonverbose');
+ __DIR__.'/testresults/go.nonverbose');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('package', $stubbed_results);
@@ -105,7 +105,7 @@
public function testNonVerboseOutputV110() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.nonverbose-go1.10');
+ __DIR__.'/testresults/go.nonverbose-go1.10');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('package', $stubbed_results);
@@ -126,7 +126,7 @@
public function testSingleTestCaseSuccessfulGo14() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.single-test-case-successful-go1.4');
+ __DIR__.'/testresults/go.single-test-case-successful-go1.4');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('subpackage_test.go', $stubbed_results);
@@ -144,7 +144,7 @@
public function testSingleTestCaseFailureGo14() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.single-test-case-failure-go1.4');
+ __DIR__.'/testresults/go.single-test-case-failure-go1.4');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('subpackage_test.go', $stubbed_results);
@@ -160,7 +160,7 @@
public function testNonVerboseOutputGo14() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.nonverbose-go1.4');
+ __DIR__.'/testresults/go.nonverbose-go1.4');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('package', $stubbed_results);
@@ -181,7 +181,7 @@
public function testMultipleTestCasesSuccessfulGo14() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.multiple-test-cases-successful-go1.4');
+ __DIR__.'/testresults/go.multiple-test-cases-successful-go1.4');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('package', $stubbed_results);
@@ -203,7 +203,7 @@
public function testMultipleTestCasesFailureGo14() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/go.multiple-test-cases-failure-go1.4');
+ __DIR__.'/testresults/go.multiple-test-cases-failure-go1.4');
$parsed_results = id(new ArcanistGoTestResultParser())
->parseTestResults('package', $stubbed_results);
diff --git a/src/unit/parser/__tests__/XUnitTestResultParserTestCase.php b/src/unit/parser/__tests__/XUnitTestResultParserTestCase.php
--- a/src/unit/parser/__tests__/XUnitTestResultParserTestCase.php
+++ b/src/unit/parser/__tests__/XUnitTestResultParserTestCase.php
@@ -7,7 +7,7 @@
public function testAcceptsNoTestsInput() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/xunit.no-tests');
+ __DIR__.'/testresults/xunit.no-tests');
$parsed_results = id(new ArcanistXUnitTestResultParser())
->parseTestResults($stubbed_results);
@@ -16,7 +16,7 @@
public function testAcceptsSimpleInput() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/xunit.simple');
+ __DIR__.'/testresults/xunit.simple');
$parsed_results = id(new ArcanistXUnitTestResultParser())
->parseTestResults($stubbed_results);
@@ -38,7 +38,7 @@
public function testInvalidXmlInputFailure() {
$stubbed_results = Filesystem::readFile(
- dirname(__FILE__).'/testresults/xunit.invalid-xml');
+ __DIR__.'/testresults/xunit.invalid-xml');
try {
$parsed_results = id(new ArcanistXUnitTestResultParser())
->parseTestResults($stubbed_results);
diff --git a/src/utils/__tests__/PhutilCowsayTestCase.php b/src/utils/__tests__/PhutilCowsayTestCase.php
--- a/src/utils/__tests__/PhutilCowsayTestCase.php
+++ b/src/utils/__tests__/PhutilCowsayTestCase.php
@@ -3,7 +3,7 @@
final class PhutilCowsayTestCase extends PhutilTestCase {
public function testCowsay() {
- $dir = dirname(__FILE__).'/cowsay/';
+ $dir = __DIR__.'/cowsay/';
$tests = array();
foreach (Filesystem::listDirectory($dir, false) as $test) {
if (preg_match('/\.test\z/', $test)) {
diff --git a/src/utils/__tests__/PhutilHashingIteratorTestCase.php b/src/utils/__tests__/PhutilHashingIteratorTestCase.php
--- a/src/utils/__tests__/PhutilHashingIteratorTestCase.php
+++ b/src/utils/__tests__/PhutilHashingIteratorTestCase.php
@@ -3,7 +3,7 @@
final class PhutilHashingIteratorTestCase extends PhutilTestCase {
public function testHashingIterator() {
- $path = dirname(__FILE__).'/hashingiterator/mostlyprime.txt';
+ $path = __DIR__.'/hashingiterator/mostlyprime.txt';
$stream = fopen($path, 'rb');
$algorithm = 'sha256';
diff --git a/src/utils/__tests__/PhutilSystemTestCase.php b/src/utils/__tests__/PhutilSystemTestCase.php
--- a/src/utils/__tests__/PhutilSystemTestCase.php
+++ b/src/utils/__tests__/PhutilSystemTestCase.php
@@ -10,7 +10,7 @@
),
);
- $dir = dirname(__FILE__).'/memory';
+ $dir = __DIR__.'/memory';
foreach ($tests as $input => $expect) {
$raw = Filesystem::readFile($dir.'/'.$input);
$actual = PhutilSystem::parseVMStat($raw);
@@ -29,7 +29,7 @@
),
);
- $dir = dirname(__FILE__).'/memory';
+ $dir = __DIR__.'/memory';
foreach ($tests as $input => $expect) {
$raw = Filesystem::readFile($dir.'/'.$input);
$actual = PhutilSystem::parseMemInfo($raw);
diff --git a/support/init/init-arcanist.php b/support/init/init-arcanist.php
--- a/support/init/init-arcanist.php
+++ b/support/init/init-arcanist.php
@@ -1,6 +1,6 @@
<?php
-require_once dirname(__FILE__).'/init-script.php';
+require_once __DIR__.'/init-script.php';
$runtime = new ArcanistRuntime();
$err = $runtime->execute($argv);
diff --git a/support/init/init-script.php b/support/init/init-script.php
--- a/support/init/init-script.php
+++ b/support/init/init-script.php
@@ -98,7 +98,7 @@
// Adjust `include_path`.
ini_set('include_path', implode(PATH_SEPARATOR, array(
- dirname(dirname(__FILE__)).'/externals/includes',
+ dirname(__DIR__).'/externals/includes',
ini_get('include_path'),
)));
@@ -110,7 +110,7 @@
@libxml_disable_entity_loader(true);
}
- $root = dirname(dirname(dirname(__FILE__)));
+ $root = dirname(dirname(__DIR__));
require_once $root.'/src/init/init-library.php';
PhutilErrorHandler::initialize();
diff --git a/support/lib/extract-symbols.php b/support/lib/extract-symbols.php
--- a/support/lib/extract-symbols.php
+++ b/support/lib/extract-symbols.php
@@ -5,7 +5,7 @@
// built-in symbol list through introspection.
$builtins = phutil_symbols_get_builtins();
-$root = dirname(dirname(dirname(__FILE__)));
+$root = dirname(dirname(__DIR__));
require_once $root.'/support/init/init-script.php';
$args = new PhutilArgumentParser($argv);
@@ -561,7 +561,7 @@
$compat = json_decode(
file_get_contents(
- dirname(__FILE__).'/../../resources/php/symbol-information.json'),
+ __DIR__.'/../../resources/php/symbol-information.json'),
true);
foreach (array('functions', 'classes', 'interfaces') as $type) {
diff --git a/support/lib/rebuild-map.php b/support/lib/rebuild-map.php
--- a/support/lib/rebuild-map.php
+++ b/support/lib/rebuild-map.php
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-$root = dirname(dirname(dirname(__FILE__)));
+$root = dirname(dirname(__DIR__));
require_once $root.'/support/init/init-script.php';
$args = new PhutilArgumentParser($argv);
diff --git a/support/unit/lock.php b/support/unit/lock.php
--- a/support/unit/lock.php
+++ b/support/unit/lock.php
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-$arcanist_root = dirname(dirname(dirname(__FILE__)));
+$arcanist_root = dirname(dirname(__DIR__));
require_once $arcanist_root.'/support/init/init-script.php';
$args = new PhutilArgumentParser($argv);
diff --git a/support/xhpast/bin/xhpast-generate-nodes.php b/support/xhpast/bin/xhpast-generate-nodes.php
--- a/support/xhpast/bin/xhpast-generate-nodes.php
+++ b/support/xhpast/bin/xhpast-generate-nodes.php
@@ -1,10 +1,10 @@
#!/usr/bin/env php
<?php
-$arcanist_root = dirname(dirname(dirname(dirname(__FILE__))));
+$arcanist_root = dirname(dirname(dirname(__DIR__)));
require_once $arcanist_root.'/support/init/init-script.php';
-$xhpast_root = dirname(dirname(__FILE__));
+$xhpast_root = dirname(__DIR__);
$hpp_outpath = $xhpast_root.'/node_names.hpp';
$php_outpath = $xhpast_root.'/parser_nodes.php';
diff --git a/support/xhpast/bin/xhpast-generate-version.php b/support/xhpast/bin/xhpast-generate-version.php
--- a/support/xhpast/bin/xhpast-generate-version.php
+++ b/support/xhpast/bin/xhpast-generate-version.php
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-$arcanist_root = dirname(dirname(dirname(dirname(__FILE__))));
+$arcanist_root = dirname(dirname(dirname(__DIR__)));
require_once $arcanist_root.'/support/init/init-script.php';
echo PhutilXHPASTBinary::EXPECTED_VERSION;
diff --git a/support/xhpast/build-xhpast.php b/support/xhpast/build-xhpast.php
--- a/support/xhpast/build-xhpast.php
+++ b/support/xhpast/build-xhpast.php
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-$root = dirname(dirname(dirname(__FILE__)));
+$root = dirname(dirname(__DIR__));
require_once $root.'/support/init/init-script.php';
PhutilXHPASTBinary::build();

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 03:16 (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016258
Default Alt Text
D25073.1734664582.diff (107 KB)

Event Timeline