diff --git a/src/lint/linter/__tests__/ArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLinterTestCase.php index 5f9f7b3e..6e221ad4 100644 --- a/src/lint/linter/__tests__/ArcanistLinterTestCase.php +++ b/src/lint/linter/__tests__/ArcanistLinterTestCase.php @@ -19,8 +19,7 @@ abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase { $test_count++; } - $this->assertEqual( - true, + $this->assertTrue( ($test_count > 0), pht('Expected to find some .lint-test tests in directory %s!', $root)); } diff --git a/src/parser/__tests__/ArcanistBundleTestCase.php b/src/parser/__tests__/ArcanistBundleTestCase.php index 53685a48..bc8c4438 100644 --- a/src/parser/__tests__/ArcanistBundleTestCase.php +++ b/src/parser/__tests__/ArcanistBundleTestCase.php @@ -146,8 +146,7 @@ final class ArcanistBundleTestCase extends ArcanistTestCase { // affected path because we don't care about the order in which the // changes appear. foreach ($raw_changes as $change) { - $this->assertEqual( - true, + $this->assertTrue( empty($changes[$change->getCurrentPath()]), "Unique Path: ".$change->getCurrentPath()); $changes[$change->getCurrentPath()] = $change; @@ -568,7 +567,7 @@ final class ArcanistBundleTestCase extends ArcanistTestCase { case '228d7be4840313ed805c25c15bba0f7b188af3e6': // "Add a text file." // This commit is never reached because we skip the 0th commit junk. - $this->assertEqual(true, "This is never reached."); + $this->assertTrue(true, "This is never reached."); break; default: throw new Exception( diff --git a/src/parser/__tests__/ArcanistDiffParserTestCase.php b/src/parser/__tests__/ArcanistDiffParserTestCase.php index 24b41089..d90988cc 100644 --- a/src/parser/__tests__/ArcanistDiffParserTestCase.php +++ b/src/parser/__tests__/ArcanistDiffParserTestCase.php @@ -37,7 +37,7 @@ final class ArcanistDiffParserTestCase extends ArcanistTestCase { $this->assertEqual(count($changes), $expect_two ? 2 : 1); $change = reset($changes); - $this->assertEqual(true, $change !== null); + $this->assertTrue($change !== null); $hunks = $change->getHunks(); $this->assertEqual(1, count($hunks)); @@ -327,8 +327,7 @@ EOTEXT $this->assertEqual( $change->getCurrentPath(), $target->getOldPath()); - $this->assertEqual( - true, + $this->assertTrue( in_array($target->getCurrentPath(), $change->getAwayPaths())); break; case 'git-merge-header.gitdiff': @@ -653,8 +652,7 @@ EOTEXT } catch (Exception $ex) { $caught = $ex; } - $this->assertEqual( - true, + $this->assertTrue( ($caught instanceof Exception), "Ambiguous: {$input}"); } diff --git a/src/unit/engine/__tests__/XUnitTestResultParserTestCase.php b/src/unit/engine/__tests__/XUnitTestResultParserTestCase.php index f9bb30a1..e2050c53 100644 --- a/src/unit/engine/__tests__/XUnitTestResultParserTestCase.php +++ b/src/unit/engine/__tests__/XUnitTestResultParserTestCase.php @@ -38,7 +38,7 @@ final class XUnitTestResultParserTestCase extends ArcanistTestCase { // OK } - $this->assertEqual(true, true); + $this->assertTrue(true); } public function testInvalidXmlInputFailure() { @@ -53,7 +53,7 @@ final class XUnitTestResultParserTestCase extends ArcanistTestCase { // OK } - $this->assertEqual(true, true); + $this->assertTrue(true); } }