mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 23:02: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++;
|
$test_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assertEqual(
|
$this->assertTrue(
|
||||||
true,
|
|
||||||
($test_count > 0),
|
($test_count > 0),
|
||||||
pht('Expected to find some .lint-test tests in directory %s!', $root));
|
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
|
// affected path because we don't care about the order in which the
|
||||||
// changes appear.
|
// changes appear.
|
||||||
foreach ($raw_changes as $change) {
|
foreach ($raw_changes as $change) {
|
||||||
$this->assertEqual(
|
$this->assertTrue(
|
||||||
true,
|
|
||||||
empty($changes[$change->getCurrentPath()]),
|
empty($changes[$change->getCurrentPath()]),
|
||||||
"Unique Path: ".$change->getCurrentPath());
|
"Unique Path: ".$change->getCurrentPath());
|
||||||
$changes[$change->getCurrentPath()] = $change;
|
$changes[$change->getCurrentPath()] = $change;
|
||||||
|
@ -568,7 +567,7 @@ final class ArcanistBundleTestCase extends ArcanistTestCase {
|
||||||
case '228d7be4840313ed805c25c15bba0f7b188af3e6':
|
case '228d7be4840313ed805c25c15bba0f7b188af3e6':
|
||||||
// "Add a text file."
|
// "Add a text file."
|
||||||
// This commit is never reached because we skip the 0th commit junk.
|
// 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;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
|
|
|
@ -37,7 +37,7 @@ final class ArcanistDiffParserTestCase extends ArcanistTestCase {
|
||||||
|
|
||||||
$this->assertEqual(count($changes), $expect_two ? 2 : 1);
|
$this->assertEqual(count($changes), $expect_two ? 2 : 1);
|
||||||
$change = reset($changes);
|
$change = reset($changes);
|
||||||
$this->assertEqual(true, $change !== null);
|
$this->assertTrue($change !== null);
|
||||||
|
|
||||||
$hunks = $change->getHunks();
|
$hunks = $change->getHunks();
|
||||||
$this->assertEqual(1, count($hunks));
|
$this->assertEqual(1, count($hunks));
|
||||||
|
@ -327,8 +327,7 @@ EOTEXT
|
||||||
$this->assertEqual(
|
$this->assertEqual(
|
||||||
$change->getCurrentPath(),
|
$change->getCurrentPath(),
|
||||||
$target->getOldPath());
|
$target->getOldPath());
|
||||||
$this->assertEqual(
|
$this->assertTrue(
|
||||||
true,
|
|
||||||
in_array($target->getCurrentPath(), $change->getAwayPaths()));
|
in_array($target->getCurrentPath(), $change->getAwayPaths()));
|
||||||
break;
|
break;
|
||||||
case 'git-merge-header.gitdiff':
|
case 'git-merge-header.gitdiff':
|
||||||
|
@ -653,8 +652,7 @@ EOTEXT
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
$caught = $ex;
|
$caught = $ex;
|
||||||
}
|
}
|
||||||
$this->assertEqual(
|
$this->assertTrue(
|
||||||
true,
|
|
||||||
($caught instanceof Exception),
|
($caught instanceof Exception),
|
||||||
"Ambiguous: {$input}");
|
"Ambiguous: {$input}");
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ final class XUnitTestResultParserTestCase extends ArcanistTestCase {
|
||||||
// OK
|
// OK
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assertEqual(true, true);
|
$this->assertTrue(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInvalidXmlInputFailure() {
|
public function testInvalidXmlInputFailure() {
|
||||||
|
@ -53,7 +53,7 @@ final class XUnitTestResultParserTestCase extends ArcanistTestCase {
|
||||||
// OK
|
// OK
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assertEqual(true, true);
|
$this->assertTrue(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue