fixed Proxy tests

This commit is contained in:
Dominik Liebler
2018-06-14 22:56:13 +02:00
parent aff0ca5196
commit 0f4da347d4

View File

@@ -13,12 +13,12 @@ class ProxyTest extends TestCase
$bankAccount->deposit(30);
// this time balance is being calculated
$this->assertEquals(0, $bankAccount->getBalance());
$this->assertEquals(30, $bankAccount->getBalance());
// inheritance allows for BankAccountProxy to behave to an outsider exactly like ServerBankAccount
$bankAccount->deposit(50);
// this time the previously calculated balance is returned again without re-calculating it
$this->assertEquals(0, $bankAccount->getBalance());
$this->assertEquals(30, $bankAccount->getBalance());
}
}