You are here

public function BankAccountTest::testDepositWithdrawMoney in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php \BankAccountTest::testDepositWithdrawMoney()

@covers BankAccount::getBalance @covers BankAccount::depositMoney @covers BankAccount::withdrawMoney

File

vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php, line 58

Class

BankAccountTest

Code

public function testDepositWithdrawMoney() {
  $this
    ->assertEquals(0, $this->ba
    ->getBalance());
  $this->ba
    ->depositMoney(1);
  $this
    ->assertEquals(1, $this->ba
    ->getBalance());
  $this->ba
    ->withdrawMoney(1);
  $this
    ->assertEquals(0, $this->ba
    ->getBalance());
}