| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class FactoryTest extends \PHPUnit\Framework\TestCase |
||
| 13 | { |
||
| 14 | public function testCreateController() |
||
| 15 | { |
||
| 16 | $target = '\\Aimeos\\Controller\\Frontend\\Site\\Iface'; |
||
| 17 | |||
| 18 | $controller = \Aimeos\Controller\Frontend\Site\Factory::create( \TestHelperFrontend::getContext() ); |
||
| 19 | $this->assertInstanceOf( $target, $controller ); |
||
| 20 | |||
| 21 | $controller = \Aimeos\Controller\Frontend\Site\Factory::create( \TestHelperFrontend::getContext(), 'Standard' ); |
||
| 22 | $this->assertInstanceOf( $target, $controller ); |
||
| 23 | } |
||
| 24 | |||
| 25 | |||
| 26 | public function testCreateControllerInvalidImplementation() |
||
| 27 | { |
||
| 28 | $this->expectException( '\\Aimeos\\MW\\Common\\Exception' ); |
||
| 29 | \Aimeos\Controller\Frontend\Site\Factory::create( \TestHelperFrontend::getContext(), 'Invalid' ); |
||
| 30 | } |
||
| 31 | |||
| 32 | |||
| 33 | public function testCreateControllerInvalidName() |
||
| 37 | } |
||
| 38 | |||
| 39 | |||
| 40 | public function testCreateControllerNotExisting() |
||
| 46 |