コード例 #1
0
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getMockBuilder(ModuleViewHelper::class)->setMethods(array('setMainRequestToUriBuilder'))->getMock();
     $this->uriBuilder = $this->createMock(UriBuilder::class);
     $this->inject($this->viewHelper, 'uriBuilder', $this->uriBuilder);
 }
コード例 #2
0
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getAccessibleMock(ModuleViewHelper::class, array('renderChildren'));
     $this->tagBuilder = $this->createMock(TagBuilder::class);
     $this->uriModuleViewHelper = $this->getMockBuilder(\Neos\Neos\ViewHelpers\Uri\ModuleViewHelper::class)->setMethods(array('setRenderingContext', 'render'))->getMock();
     $this->dummyRenderingContext = $this->createMock(RenderingContextInterface::class);
     $this->inject($this->viewHelper, 'renderingContext', $this->dummyRenderingContext);
     $this->inject($this->viewHelper, 'tag', $this->tagBuilder);
     $this->inject($this->viewHelper, 'uriModuleViewHelper', $this->uriModuleViewHelper);
 }
コード例 #3
0
 /**
  * Sets up this test case
  */
 protected function setUp()
 {
     parent::setUp();
     $this->redirectStorage = new RedirectStorage();
     $this->mockRedirectRepository = $this->getMockBuilder(RedirectRepository::class)->disableOriginalConstructor()->getMock();
     $this->inject($this->redirectStorage, 'redirectRepository', $this->mockRedirectRepository);
     $this->mockRouterCachingService = $this->getMockBuilder(RouterCachingService::class)->disableOriginalConstructor()->getMock();
     $this->inject($this->redirectStorage, 'routerCachingService', $this->mockRouterCachingService);
     $this->redirectServiceMock = $this->getMockBuilder(RedirectService::class)->disableOriginalConstructor()->getMock();
     $this->inject($this->redirectStorage, '_redirectService', $this->redirectServiceMock);
     $loggerMock = $this->getMockBuilder(SystemLoggerInterface::class)->getMock();
     $this->inject($this->redirectStorage, '_logger', $loggerMock);
 }
コード例 #4
0
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setup();
     vfsStream::setup('Foo');
     $this->httpRequest = Http\Request::create(new Http\Uri('http://localhost'));
     $this->httpResponse = new Http\Response();
     $mockRequestHandler = $this->createMock(Http\RequestHandler::class);
     $mockRequestHandler->expects($this->any())->method('getHttpRequest')->will($this->returnValue($this->httpRequest));
     $mockRequestHandler->expects($this->any())->method('getHttpResponse')->will($this->returnValue($this->httpResponse));
     $this->mockBootstrap = $this->createMock(Bootstrap::class);
     $this->mockBootstrap->expects($this->any())->method('getActiveRequestHandler')->will($this->returnValue($mockRequestHandler));
     $this->mockSecurityContext = $this->createMock(Context::class);
     $this->mockObjectManager = $this->createMock(ObjectManagerInterface::class);
     $this->mockObjectManager->expects($this->any())->method('get')->with(Context::class)->will($this->returnValue($this->mockSecurityContext));
 }
 public function setUp()
 {
     parent::setUp();
     $this->contentElementEditableService = new ContentElementEditableService();
     $this->mockPrivilegeManager = $this->getMockBuilder(PrivilegeManagerInterface::class)->getMock();
     $this->inject($this->contentElementEditableService, 'privilegeManager', $this->mockPrivilegeManager);
     $this->mockNodeAuthorizationService = $this->getMockBuilder(AuthorizationService::class)->getMock();
     $this->inject($this->contentElementEditableService, 'nodeAuthorizationService', $this->mockNodeAuthorizationService);
     $this->mockHtmlAugmenter = $this->getMockBuilder(HtmlAugmenter::class)->getMock();
     $this->inject($this->contentElementEditableService, 'htmlAugmenter', $this->mockHtmlAugmenter);
     $this->mockTsRuntime = $this->getMockBuilder(\Neos\Fusion\Core\Runtime::class)->disableOriginalConstructor()->getMock();
     $this->mockContentContext = $this->getMockBuilder(\Neos\Neos\Domain\Service\ContentContext::class)->disableOriginalConstructor()->getMock();
     $this->mockNode = $this->getMockBuilder(\Neos\ContentRepository\Domain\Model\NodeInterface::class)->getMock();
     $this->mockNode->expects($this->any())->method('getContext')->will($this->returnValue($this->mockContentContext));
     $this->mockNode->expects($this->any())->method('getNodeType')->will($this->returnValue(new NodeType('Acme.Test:Headline', [], [])));
     $this->mockTsContext = array('node' => $this->mockNode);
     $this->mockTsRuntime->expects($this->any())->method('getCurrentContext')->will($this->returnValue($this->mockTsContext));
 }
コード例 #6
0
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->typeConverter = new UriTypeConverter();
 }
コード例 #7
0
 public function setUp()
 {
     parent::setUp();
     $this->mockTsRuntime = $this->getMockBuilder(Runtime::class)->disableOriginalConstructor()->getMock();
 }
コード例 #8
0
 public function setUp()
 {
     parent::setUp();
     $this->mockActionRequest = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->getMock();
     $this->mockSystemLogger = $this->createMock(SystemLoggerInterface::class);
 }
コード例 #9
0
 /**
  *
  */
 protected function setUp()
 {
     parent::setUp();
     $this->browser = new Client\Browser();
 }
コード例 #10
0
 public function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getMockBuilder(\Neos\FluidAdaptor\ViewHelpers\Format\CurrencyViewHelper::class)->setMethods(array('renderChildren'))->getMock();
 }
コード例 #11
0
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->scriptsMock = $this->getAccessibleMock(Scripts::class, ['dummy']);
 }