mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-10 00:46:38 +02:00
Use class constant instead of hardcoded namespace
This commit is contained in:
@@ -15,13 +15,13 @@ class PrototypeTest extends \PHPUnit_Framework_TestCase
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
$book = clone $fooPrototype;
|
||||
$book->setTitle('Foo Book No ' . $i);
|
||||
$this->assertInstanceOf('DesignPatterns\Creational\Prototype\FooBookPrototype', $book);
|
||||
$this->assertInstanceOf(FooBookPrototype::class, $book);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$book = clone $barPrototype;
|
||||
$book->setTitle('Bar Book No ' . $i);
|
||||
$this->assertInstanceOf('DesignPatterns\Creational\Prototype\BarBookPrototype', $book);
|
||||
$this->assertInstanceOf(BarBookPrototype::class, $book);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user