/** * @group SwitchFactory * @covers FOF30\Factory\SwitchFactory::transparentAuthentication * @dataProvider SwitchFactoryDataprovider::getTestTransparentAuthentication */ public function testTransparentAuthentication($test, $check) { $msg = 'SwitchFactory::transparentAuthentication %s - Case: ' . $check['case']; $container = new TestContainer(array('componentName' => $test['component'])); $platform = $container->platform; $platform::$isAdmin = $test['backend']; $factory = new SwitchFactory($container); $result = $factory->transparentAuthentication(); $this->assertEquals($check['result'], get_class($result), sprintf($msg, 'Returned the wrong result')); }
/** * Creates a new Toolbar * * @param array $config The configuration values for the Toolbar object * * @return Toolbar */ public function toolbar(array $config = array()) { $appConfig = $this->container->appConfig; $defaultConfig = array('useConfigurationFile' => true, 'renderFrontendButtons' => in_array($appConfig->get("views.*.config.renderFrontendButtons"), array(true, 'true', 'yes', 'on', 1)), 'renderFrontendSubmenu' => in_array($appConfig->get("views.*.config.renderFrontendSubmenu"), array(true, 'true', 'yes', 'on', 1))); $config = array_merge($defaultConfig, $config); return parent::toolbar($config); }