コード例 #1
0
 public function setUp()
 {
     parent::setUp();
     $this->setUpTYPO3Globals();
     $this->subject = new Page404ErrorHandler();
     // Mock dependencies
     $this->pageRepositoryMock = $this->getMock('R3H6\\Error404page\\Domain\\Repository\\PageRepository', get_class_methods('R3H6\\Error404page\\Domain\\Repository\\PageRepository'), array(), '', false);
     $this->inject($this->subject, 'pageRepository', $this->pageRepositoryMock);
     $this->httpServiceMock = $this->getMock('R3H6\\Error404page\\Service\\HttpService', get_class_methods('R3H6\\Error404page\\Service\\HttpService'), array(), '', false);
     $this->inject($this->subject, 'httpService', $this->httpServiceMock);
 }
コード例 #2
0
 public function setUp()
 {
     parent::setUp();
     $this->setUpTYPO3Globals();
     $this->subject = new RedirectErrorHandler();
     // Mock dependencies
     $this->pageRepositoryMock = $this->getMock('R3H6\\Error404page\\Domain\\Repository\\PageRepository', get_class_methods('R3H6\\Error404page\\Domain\\Repository\\PageRepository'), array(), '', false);
     $this->inject($this->subject, 'pageRepository', $this->pageRepositoryMock);
     $this->pageTsConfigManagerMock = $this->getMock('R3H6\\Error404page\\Configuration\\PageTsConfigManager', get_class_methods('R3H6\\Error404page\\Configuration\\PageTsConfigManager'), array(), '', false);
     $this->inject($this->subject, 'pageTsConfigManager', $this->pageTsConfigManagerMock);
     $this->frontendUserMock = $this->getMock('R3H6\\Error404page\\Facade\\FrontendUser', get_class_methods('R3H6\\Error404page\\Facade\\FrontendUser'), array(), '', false);
     $this->inject($this->subject, 'frontendUser', $this->frontendUserMock);
     $this->frontendControllerMock = $this->getMock('R3H6\\Error404page\\Facade\\FrontendController', get_class_methods('R3H6\\Error404page\\Facade\\FrontendController'), array(), '', false);
     $this->inject($this->subject, 'frontendController', $this->frontendControllerMock);
     $this->httpServiceMock = $this->getMock('R3H6\\Error404page\\Service\\HttpService', get_class_methods('R3H6\\Error404page\\Service\\HttpService'), array(), '', false);
     $this->inject($this->subject, 'httpService', $this->httpServiceMock);
 }
コード例 #3
0
 public function setUp()
 {
     parent::setUp();
     $this->subject = new DefaultErrorHandler();
 }