public function BankAccountTest::testBalanceCannotBecomeNegative2 in Zircon Profile 8
Same name in this branch
- 8 vendor/phpunit/phpunit/tests/_files/BankAccountTest.php \BankAccountTest::testBalanceCannotBecomeNegative2()
- 8 vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php \BankAccountTest::testBalanceCannotBecomeNegative2()
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/tests/_files/BankAccountTest.php \BankAccountTest::testBalanceCannotBecomeNegative2()
- 8.0 vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php \BankAccountTest::testBalanceCannotBecomeNegative2()
@covers BankAccount::depositMoney
File
- vendor/
phpunit/ php-code-coverage/ tests/ _files/ BankAccountTest.php, line 40
Class
Code
public function testBalanceCannotBecomeNegative2() {
try {
$this->ba
->depositMoney(-1);
} catch (RuntimeException $e) {
$this
->assertEquals(0, $this->ba
->getBalance());
return;
}
$this
->fail();
}