public function setUp() { $container = new Container(); $containerProvider = new ContainerProvider(); $containerProvider->registerBaseUrl($container); $containerProvider->registerAdminConfig($container); $containerProvider->registerAuthenticator($container); $containerProvider->registerAuthorizer($container); $this->obj = new SaveAction(['logger' => $container['logger'], 'container' => $container]); }
/** * @return Container */ private function container() { if ($this->container === null) { $container = new Container(); $containerProvider = new ContainerProvider(); $containerProvider->registerBaseUrl($container); $containerProvider->registerAdminConfig($container); $containerProvider->registerAuthenticator($container); $containerProvider->registerAuthorizer($container); $this->container = $container; } return $this->container; }
public function setUp() { $container = new Container(); $containerProvider = new ContainerProvider(); $containerProvider->registerAdminConfig($container); $containerProvider->registerBaseUrl($container); $containerProvider->registerModelFactory($container); $containerProvider->registerLogger($container); $containerProvider->registerMetadataLoader($container); $containerProvider->registerAuthenticator($container); $containerProvider->registerAuthorizer($container); $this->obj = $this->getMock(AdminTemplate::class, null, [['logger' => $container['logger'], 'metadata_loader' => $container['metadata/loader']]]); $this->obj->setDependencies($container); $this->obj->expects($this->any())->method('isAuthenticated')->will($this->returnValue(true)); }
public function setUp() { $container = new Container(); $containerProvider = new ContainerProvider(); $containerProvider->registerBaseUrl($container); $containerProvider->registerAdminConfig($container); $containerProvider->registerLogger($container); $containerProvider->registerModelFactory($container); $containerProvider->registerMetadataLoader($container); $containerProvider->registerAuthenticator($container); $containerProvider->registerAuthorizer($container); $containerProvider->registerWidgetFactory($container); $containerProvider->registerDashboardBuilder($container); $this->obj = new EditTemplate(['logger' => $container['logger'], 'metadata_loader' => $container['metadata/loader'], 'container' => $container]); //$this->obj->setDependencies($container); }