| Total Complexity | 2 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Chekote\NounStore\Singleton; |
||
| 14 | class GetInstanceTest extends TestCase |
||
|
|
|||
| 15 | { |
||
| 16 | public function testGetInstanceReturnsInstanceOfSingleton() |
||
| 17 | { |
||
| 18 | $instance = SingletonClass::getInstance(); |
||
| 19 | |||
| 20 | $this->assertInstanceOf(SingletonClass::class, $instance); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function testSubsequentCallsToGetInstanceReturnSameInstance() |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.