mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-09 00:16:32 +02:00
Use class constant instead of hardcoded namespace
This commit is contained in:
@@ -11,7 +11,7 @@ class MultitonTest extends \PHPUnit_Framework_TestCase
|
||||
$firstCall = Multiton::getInstance(Multiton::INSTANCE_1);
|
||||
$secondCall = Multiton::getInstance(Multiton::INSTANCE_1);
|
||||
|
||||
$this->assertInstanceOf('DesignPatterns\Creational\Multiton\Multiton', $firstCall);
|
||||
$this->assertInstanceOf(Multiton::class, $firstCall);
|
||||
$this->assertSame($firstCall, $secondCall);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ class MultitonTest extends \PHPUnit_Framework_TestCase
|
||||
$firstCall = Multiton::getInstance(Multiton::INSTANCE_1);
|
||||
$secondCall = Multiton::getInstance(Multiton::INSTANCE_2);
|
||||
|
||||
$this->assertInstanceOf('DesignPatterns\Creational\Multiton\Multiton', $firstCall);
|
||||
$this->assertInstanceOf('DesignPatterns\Creational\Multiton\Multiton', $secondCall);
|
||||
$this->assertInstanceOf(Multiton::class, $firstCall);
|
||||
$this->assertInstanceOf(Multiton::class, $secondCall);
|
||||
$this->assertNotSame($firstCall, $secondCall);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user