Create a new View object
public view ( string $viewName, string $viewType = 'html', array $config = [] ) : |
||
$viewName | string | The name of the view we're getting a View object for. |
$viewType | string | The type of the View object. By default it's "html". |
$config | array | Optional MVC configuration values for the View object. |
Résultat |
/** * @group MagicSwitchFactory * @covers FOF30\Factory\MagicSwitchFactory::view * @dataProvider MagicSwitchFactoryDataprovider::getTestView */ public function testView($test, $check) { $msg = 'MagicSwitchFactory::view %s - Case: ' . $check['case']; $platform = static::$container->platform; $platform::$template = 'fake_test_template'; $platform::$uriBase = 'www.example.com'; $factory = new MagicSwitchFactory(static::$container); $result = $factory->view($test['view']); $this->assertEquals($check['result'], get_class($result), sprintf($msg, 'Returned the wrong result')); }