mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Utilize assertFalse
and assertTrue
methods.
Summary: Ref D8460. Use `$this->assertFalse(...)` and `$this->assertTrue(...)` instead of `$this->assertEqual(false, ...)` and `$this->assertEqual(true, ...)` respectively. Test Plan: `arc unit` Reviewers: #blessed_reviewers, epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8461
This commit is contained in:
parent
c42bef4e25
commit
06cfe0746e
4 changed files with 8 additions and 12 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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}");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue