mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 20:50:15 +02:00
Replaced with strict assertions
This commit is contained in:
@@ -13,12 +13,12 @@ class ProxyTest extends TestCase
|
||||
$bankAccount->deposit(30);
|
||||
|
||||
// this time balance is being calculated
|
||||
$this->assertEquals(30, $bankAccount->getBalance());
|
||||
$this->assertSame(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(30, $bankAccount->getBalance());
|
||||
$this->assertSame(30, $bankAccount->getBalance());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user