mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 19:50:12 +02:00
Use class constant instead of hardcoded namespace
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace DesignPatterns\Creational\SimpleFactory\Tests;
|
||||
|
||||
use DesignPatterns\Creational\SimpleFactory\Bicycle;
|
||||
use DesignPatterns\Creational\SimpleFactory\SimpleFactory;
|
||||
|
||||
class SimpleFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
@@ -9,6 +10,6 @@ class SimpleFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
public function testCanCreateBicycle()
|
||||
{
|
||||
$bicycle = (new SimpleFactory())->createBicycle();
|
||||
$this->assertInstanceOf('DesignPatterns\Creational\SimpleFactory\Bicycle', $bicycle);
|
||||
$this->assertInstanceOf(Bicycle::class, $bicycle);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user