Note: This factory class will ONLY look for MVC objects in the same component section (front-end, back-end) you are currently running in. If they are not found a new one will be created magically.
Inheritance: extends BasicFactory, implements FOF30\Factory\FactoryInterface
Beispiel #1
0
 /**
  * @group           MagicFactory
  * @covers          FOF30\Factory\MagicFactory::transparentAuthentication
  * @dataProvider    MagicFactoryDataprovider::getTestTransparentAuthentication
  */
 public function testTransparentAuthentication($test, $check)
 {
     $msg = 'MagicFactory::transparentAuthentication %s - Case: ' . $check['case'];
     $container = new TestContainer(array('backEndPath' => JPATH_TESTS . '/Stubs/Fakeapp/Admin'));
     $platform = $container->platform;
     $platform::$isAdmin = $test['backend'];
     // Required so we force FOF to read the fof.xml file
     $dummy = $container->appConfig;
     $factory = new MagicFactory($container);
     $result = $factory->transparentAuthentication();
     $this->assertEquals($check['result'], get_class($result), sprintf($msg, 'Returned the wrong result'));
 }