mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 20:20:15 +02:00
Replaced with strict assertions
This commit is contained in:
@@ -13,8 +13,8 @@ class DecoratorTest extends TestCase
|
||||
{
|
||||
$booking = new DoubleRoomBooking();
|
||||
|
||||
$this->assertEquals(40, $booking->calculatePrice());
|
||||
$this->assertEquals('double room', $booking->getDescription());
|
||||
$this->assertSame(40, $booking->calculatePrice());
|
||||
$this->assertSame('double room', $booking->getDescription());
|
||||
}
|
||||
|
||||
public function testCanCalculatePriceForDoubleRoomBookingWithWiFi()
|
||||
@@ -22,8 +22,8 @@ class DecoratorTest extends TestCase
|
||||
$booking = new DoubleRoomBooking();
|
||||
$booking = new WiFi($booking);
|
||||
|
||||
$this->assertEquals(42, $booking->calculatePrice());
|
||||
$this->assertEquals('double room with wifi', $booking->getDescription());
|
||||
$this->assertSame(42, $booking->calculatePrice());
|
||||
$this->assertSame('double room with wifi', $booking->getDescription());
|
||||
}
|
||||
|
||||
public function testCanCalculatePriceForDoubleRoomBookingWithWiFiAndExtraBed()
|
||||
@@ -32,7 +32,7 @@ class DecoratorTest extends TestCase
|
||||
$booking = new WiFi($booking);
|
||||
$booking = new ExtraBed($booking);
|
||||
|
||||
$this->assertEquals(72, $booking->calculatePrice());
|
||||
$this->assertEquals('double room with wifi with extra bed', $booking->getDescription());
|
||||
$this->assertSame(72, $booking->calculatePrice());
|
||||
$this->assertSame('double room with wifi with extra bed', $booking->getDescription());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user