Create a new Controller object
public controller ( string $viewName, array $config = [] ) : |
||
$viewName | string | The name of the view we're getting a Controller for. |
$config | array | Optional MVC configuration values for the Controller object. |
리턴 |
/** * @group MagicFactory * @covers FOF30\Factory\MagicFactory::controller * @dataProvider MagicFactoryDataprovider::getTestController */ public function testController($test, $check) { $msg = 'MagicFactory::controller %s - Case: ' . $check['case']; $factory = new MagicFactory(static::$container); $result = $factory->controller($test['view']); $this->assertEquals($check['result'], get_class($result), sprintf($msg, 'Returned the wrong result')); }