/**
  */
 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);
 }
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getMock('TYPO3\\Neos\\ViewHelpers\\Uri\\ModuleViewHelper', array('setMainRequestToUriBuilder'));
     $this->uriBuilder = $this->getMock('TYPO3\\Flow\\Mvc\\Routing\\UriBuilder');
     $this->inject($this->viewHelper, 'uriBuilder', $this->uriBuilder);
 }
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getAccessibleMock('TYPO3\\Neos\\ViewHelpers\\Link\\ModuleViewHelper', array('renderChildren'));
     $this->tagBuilder = $this->createMock('TYPO3\\Fluid\\Core\\ViewHelper\\TagBuilder');
     $this->uriModuleViewHelper = $this->getMockBuilder('TYPO3\\Neos\\ViewHelpers\\Uri\\ModuleViewHelper')->setMethods(array('setRenderingContext', 'render'))->getMock();
     $this->dummyRenderingContext = $this->createMock('TYPO3\\Fluid\\Core\\Rendering\\RenderingContextInterface');
     $this->inject($this->viewHelper, 'renderingContext', $this->dummyRenderingContext);
     $this->inject($this->viewHelper, 'tag', $this->tagBuilder);
     $this->inject($this->viewHelper, 'uriModuleViewHelper', $this->uriModuleViewHelper);
 }
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getAccessibleMock(ModuleViewHelper::class, array('renderChildren'));
     $this->tagBuilder = $this->createMock(TagBuilder::class);
     $this->uriModuleViewHelper = $this->getMockBuilder(\TYPO3\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);
 }
Example #5
0
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setup();
     vfsStream::setup('Foo');
     $this->httpRequest = Request::create(new Uri('http://localhost'));
     $this->httpResponse = new Response();
     $mockRequestHandler = $this->getMock('TYPO3\\Flow\\Http\\RequestHandler', array(), array(), '', FALSE, FALSE);
     $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->getMock('TYPO3\\Flow\\Core\\Bootstrap', array(), array(), '', FALSE, FALSE);
     $this->mockBootstrap->expects($this->any())->method('getActiveRequestHandler')->will($this->returnValue($mockRequestHandler));
     $this->mockSecurityContext = $this->getMock('TYPO3\\Flow\\Security\\Context', array(), array(), '', FALSE, FALSE);
     $this->mockObjectManager = $this->getMock('TYPO3\\Flow\\Object\\ObjectManagerInterface', array(), array(), '', FALSE, FALSE);
     $this->mockObjectManager->expects($this->any())->method('get')->with('TYPO3\\Flow\\Security\\Context')->will($this->returnValue($this->mockSecurityContext));
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setup();
     vfsStream::setup('Foo');
     $this->httpRequest = Request::create(new Uri('http://localhost'));
     $this->httpResponse = new Response();
     $mockRequestHandler = $this->createMock(\TYPO3\Flow\Http\RequestHandler::class, array(), array(), '', false, false);
     $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(\TYPO3\Flow\Core\Bootstrap::class, array(), array(), '', false, false);
     $this->mockBootstrap->expects($this->any())->method('getActiveRequestHandler')->will($this->returnValue($mockRequestHandler));
     $this->mockSecurityContext = $this->createMock(\TYPO3\Flow\Security\Context::class, array(), array(), '', false, false);
     $this->mockObjectManager = $this->createMock(\TYPO3\Flow\Object\ObjectManagerInterface::class, array(), array(), '', false, false);
     $this->mockObjectManager->expects($this->any())->method('get')->with(\TYPO3\Flow\Security\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('TYPO3\\TypoScript\\Core\\Runtime')->disableOriginalConstructor()->getMock();
     $this->mockContentContext = $this->getMockBuilder('TYPO3\\Neos\\Domain\\Service\\ContentContext')->disableOriginalConstructor()->getMock();
     $this->mockNode = $this->getMockBuilder('TYPO3\\TYPO3CR\\Domain\\Model\\NodeInterface')->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));
 }
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->typeConverter = new \TYPO3\Flow\Property\TypeConverter\UriTypeConverter();
 }
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->mockViewHelper = $this->getMock('TYPO3\\Fluid\\ViewHelpers\\Format\\JsonViewHelper', array('renderChildren'));
 }
 public function setUp()
 {
     parent::setUp();
     $this->mockActionRequest = $this->getMockBuilder(\TYPO3\Flow\Mvc\ActionRequest::class)->disableOriginalConstructor()->getMock();
     $this->mockSystemLogger = $this->createMock(\TYPO3\Flow\Log\SystemLoggerInterface::class);
 }
 public function setUp()
 {
     parent::setUp();
     $this->mockTsRuntime = $this->getMockBuilder('TYPO3\\TypoScript\\Core\\Runtime')->disableOriginalConstructor()->getMock();
 }
 public function setUp()
 {
     parent::setUp();
     $this->viewHelper = $this->getMockBuilder(\TYPO3\Fluid\ViewHelpers\Format\CurrencyViewHelper::class)->setMethods(array('renderChildren'))->getMock();
 }
 public function setUp()
 {
     parent::setUp();
     $this->mockBackend = $this->getMockBuilder(\TYPO3\Flow\Cache\Backend\AbstractBackend::class)->setMethods(array('get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'))->disableOriginalConstructor()->getMock();
 }
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->scriptsMock = $this->getAccessibleMock('TYPO3\\Flow\\Core\\Booting\\Scripts', array('dummy'));
 }
 /**
  *
  */
 protected function setUp()
 {
     parent::setUp();
     $this->browser = new \TYPO3\Flow\Http\Client\Browser();
 }
Example #16
0
 /**
  */
 public function setUp()
 {
     parent::setUp();
     $this->quizService = new QuizService();
 }
 /**
  */
 protected function tearDown()
 {
     parent::tearDown();
     mb_internal_encoding($this->originalMbEncodingValue);
 }
 /**
  */
 protected function setUp()
 {
     parent::setUp();
     $this->scriptsMock = $this->getAccessibleMock(\TYPO3\Flow\Core\Booting\Scripts::class, array('dummy'));
 }
 public function setUp()
 {
     parent::setUp();
     $this->mockTsRuntime = $this->getMockBuilder(Runtime::class)->disableOriginalConstructor()->getMock();
 }