/**
  * Sets up this test case
  *
  */
 protected function setUp()
 {
     $this->mockObjectManager = $this->createMock(ObjectManagerInterface::class);
     $this->mockObjectManager->expects($this->any())->method('isRegistered')->will($this->returnCallback(array($this, 'objectManagerIsRegisteredCallback')));
     $this->parser = $this->getAccessibleMock(Parser::class, array('dummy'));
     $this->parser->_set('objectManager', $this->mockObjectManager);
 }
 /**
  * Sets up this test case
  *
  */
 protected function setUp()
 {
     $this->mockObjectManager = $this->createMock('TYPO3\\Flow\\Object\\ObjectManagerInterface');
     $this->mockObjectManager->expects($this->any())->method('isRegistered')->will($this->returnCallback(array($this, 'objectManagerIsRegisteredCallback')));
     $this->parser = $this->getAccessibleMock('TYPO3\\TypoScript\\Core\\Parser', array('dummy'));
     $this->parser->_set('objectManager', $this->mockObjectManager);
 }
 /**
  * Sets up this test case
  *
  * @author  Robert Lemke <*****@*****.**>
  */
 protected function setUp()
 {
     $this->mockObjectManager = $this->getMock('TYPO3\\Flow\\Object\\ObjectManagerInterface', array(), array(), '', false);
     $this->mockObjectManager->expects($this->any())->method('isRegistered')->will($this->returnCallback(array($this, 'objectManagerIsRegisteredCallback')));
     $parserClassName = $this->buildAccessibleProxy('TYPO3\\TypoScript\\Core\\Parser');
     $this->parser = new $parserClassName();
     $this->parser->_set('objectManager', $this->mockObjectManager);
 }
 /**
  * Prepare test objects
  */
 protected function setUp()
 {
     $this->nodeFactory = $this->getMock('TYPO3\\TYPO3CR\\Domain\\Factory\\NodeFactory', array('filterNodeByContext'));
     $this->nodeFactory->expects(self::any())->method('filterNodeByContext')->willReturnArgument(0);
     $this->reflectionServiceMock = $this->getMock('TYPO3\\Flow\\Reflection\\ReflectionService');
     $this->reflectionServiceMock->expects(self::any())->method('getAllImplementationClassNamesForInterface')->with('TYPO3\\TYPO3CR\\Domain\\Model\\NodeInterface')->willReturn(array('TYPO3\\TYPO3CR\\Domain\\Model\\Node'));
     $this->objectManagerMock = $this->getMock('TYPO3\\Flow\\Object\\ObjectManagerInterface');
     $this->objectManagerMock->expects(self::any())->method('get')->with('TYPO3\\Flow\\Reflection\\ReflectionService')->willReturn($this->reflectionServiceMock);
     $this->objectManagerMock->expects(self::any())->method('getClassNameByObjectName')->with('TYPO3\\TYPO3CR\\Domain\\Model\\NodeInterface')->willReturn('TYPO3\\TYPO3CR\\Domain\\Model\\Node');
     $this->inject($this->nodeFactory, 'objectManager', $this->objectManagerMock);
 }
 /**
  * Prepare test objects
  */
 protected function setUp()
 {
     $this->nodeFactory = $this->getMockBuilder(NodeFactory::class)->setMethods(array('filterNodeByContext'))->getMock();
     $this->nodeFactory->expects(self::any())->method('filterNodeByContext')->willReturnArgument(0);
     $this->reflectionServiceMock = $this->createMock(ReflectionService::class);
     $this->reflectionServiceMock->expects(self::any())->method('getAllImplementationClassNamesForInterface')->with(NodeInterface::class)->willReturn(array(Node::class));
     $this->objectManagerMock = $this->createMock(ObjectManagerInterface::class);
     $this->objectManagerMock->expects(self::any())->method('get')->with(ReflectionService::class)->willReturn($this->reflectionServiceMock);
     $this->objectManagerMock->expects(self::any())->method('getClassNameByObjectName')->with(NodeInterface::class)->willReturn(Node::class);
     $this->inject($this->nodeFactory, 'objectManager', $this->objectManagerMock);
 }
 /**
  * Sets up this test case
  *
  */
 public function setUp()
 {
     $this->mockObjectManager = $this->createMock(\TYPO3\Flow\Object\ObjectManagerInterface::class);
     $this->mockObjectManager->expects($this->any())->method('getObjectNameByClassName')->with('Acme\\Test\\Command\\DefaultCommandController')->will($this->returnValue('Acme\\Test\\Command\\DefaultCommandController'));
     $this->mockCommand = $this->getMockBuilder(\TYPO3\Flow\Cli\Command::class)->disableOriginalConstructor()->getMock();
     $this->mockCommand->expects($this->any())->method('getControllerClassName')->will($this->returnValue('Acme\\Test\\Command\\DefaultCommandController'));
     $this->mockCommand->expects($this->any())->method('getControllerCommandName')->will($this->returnValue('list'));
     $this->mockCommandManager = $this->createMock(\TYPO3\Flow\Cli\CommandManager::class);
     $this->mockCommandManager->expects($this->any())->method('getCommandByIdentifier')->with('acme.test:default:list')->will($this->returnValue($this->mockCommand));
     $this->mockReflectionService = $this->createMock(\TYPO3\Flow\Reflection\ReflectionService::class);
     $this->requestBuilder = new \TYPO3\Flow\Cli\RequestBuilder();
     $this->requestBuilder->injectObjectManager($this->mockObjectManager);
     $this->requestBuilder->injectCommandManager($this->mockCommandManager);
 }
 /**
  * Sets up this test case
  *
  */
 public function setUp()
 {
     $this->mockObjectManager = $this->getMock('TYPO3\\Flow\\Object\\ObjectManagerInterface');
     $this->mockObjectManager->expects($this->any())->method('getObjectNameByClassName')->with('Acme\\Test\\Command\\DefaultCommandController')->will($this->returnValue('Acme\\Test\\Command\\DefaultCommandController'));
     $this->mockCommand = $this->getMock('TYPO3\\Flow\\Cli\\Command', array(), array(), '', FALSE);
     $this->mockCommand->expects($this->any())->method('getControllerClassName')->will($this->returnValue('Acme\\Test\\Command\\DefaultCommandController'));
     $this->mockCommand->expects($this->any())->method('getControllerCommandName')->will($this->returnValue('list'));
     $this->mockCommandManager = $this->getMock('TYPO3\\Flow\\Cli\\CommandManager');
     $this->mockCommandManager->expects($this->any())->method('getCommandByIdentifier')->with('acme.test:default:list')->will($this->returnValue($this->mockCommand));
     $this->mockReflectionService = $this->getMock('TYPO3\\Flow\\Reflection\\ReflectionService');
     $this->requestBuilder = new \TYPO3\Flow\Cli\RequestBuilder();
     $this->requestBuilder->injectObjectManager($this->mockObjectManager);
     $this->requestBuilder->injectReflectionService($this->mockReflectionService);
     $this->requestBuilder->injectCommandManager($this->mockCommandManager);
 }
 /**
  * @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));
 }
 /**
  * @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));
 }
 /**
  * @test
  * @expectedException \TYPO3\Flow\Mvc\Exception\ViewNotFoundException
  */
 public function resolveViewThrowsExceptionIfViewCouldNotBeResolved()
 {
     $this->mockObjectManager->expects($this->any())->method('getCaseSensitiveObjectName')->will($this->returnValue(false));
     $this->actionController->_set('defaultViewObjectName', 'ViewDefaultObjectName');
     $this->mockObjectManager->expects($this->once())->method('get')->with('ViewDefaultObjectName')->will($this->returnValue(null));
     $this->actionController->_call('resolveView');
 }
 /**
  * Sets up this test case
  */
 public function setUp()
 {
     $this->dispatcher = $this->getMock(\TYPO3\Flow\Mvc\Dispatcher::class, array('resolveController'), array(), '', FALSE);
     $this->mockActionRequest = $this->getMockBuilder(\TYPO3\Flow\Mvc\ActionRequest::class)->disableOriginalConstructor()->getMock();
     $this->mockActionRequest->expects($this->any())->method('isMainRequest')->will($this->returnValue(FALSE));
     $this->mockParentRequest = $this->getMockBuilder(\TYPO3\Flow\Mvc\ActionRequest::class)->disableOriginalConstructor()->getMock();
     $this->mockActionRequest->expects($this->any())->method('getParentRequest')->will($this->returnValue($this->mockParentRequest));
     $this->mockMainRequest = $this->getMockBuilder(\TYPO3\Flow\Mvc\ActionRequest::class)->disableOriginalConstructor()->getMock();
     $this->mockActionRequest->expects($this->any())->method('getMainRequest')->will($this->returnValue($this->mockMainRequest));
     $this->mockHttpRequest = $this->getMockBuilder(\TYPO3\Flow\Http\Request::class)->disableOriginalConstructor()->getMock();
     $this->mockActionRequest->expects($this->any())->method('getHttpRequest')->will($this->returnValue($this->mockHttpRequest));
     $this->mockHttpResponse = $this->getMockBuilder(\TYPO3\Flow\Http\Response::class)->disableOriginalConstructor()->getMock();
     $this->mockController = $this->getMock(\TYPO3\Flow\Mvc\Controller\ControllerInterface::class, array('processRequest'));
     $this->dispatcher->expects($this->any())->method('resolveController')->will($this->returnValue($this->mockController));
     $this->mockSecurityContext = $this->getMockBuilder(\TYPO3\Flow\Security\Context::class)->disableOriginalConstructor()->getMock();
     $this->mockFirewall = $this->getMockBuilder(\TYPO3\Flow\Security\Authorization\FirewallInterface::class)->getMock();
     $this->mockSecurityLogger = $this->getMockBuilder(\TYPO3\Flow\Log\SecurityLoggerInterface::class)->getMock();
     $this->mockObjectManager = $this->getMockBuilder(\TYPO3\Flow\Object\ObjectManagerInterface::class)->getMock();
     $this->mockObjectManager->expects($this->any())->method('get')->will($this->returnCallback(function ($className) {
         if ($className === \TYPO3\Flow\Security\Context::class) {
             return $this->mockSecurityContext;
         } elseif ($className === \TYPO3\Flow\Security\Authorization\FirewallInterface::class) {
             return $this->mockFirewall;
         } elseif ($className === \TYPO3\Flow\Log\SecurityLoggerInterface::class) {
             return $this->mockSecurityLogger;
         }
         return NULL;
     }));
     $this->inject($this->dispatcher, 'objectManager', $this->mockObjectManager);
 }
 /**
  * @test
  */
 public function resolveValidatorObjectNameCanResolveShortNamesOfBuiltInValidators()
 {
     $this->mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\Flow\\Reflection\\ReflectionService')->will($this->returnValue($this->mockReflectionService));
     $this->mockObjectManager->expects($this->at(1))->method('isRegistered')->with('Foo')->will($this->returnValue(FALSE));
     $this->mockObjectManager->expects($this->at(2))->method('isRegistered')->with('TYPO3\\Flow\\Validation\\Validator\\FooValidator')->will($this->returnValue(TRUE));
     $this->mockReflectionService->expects($this->any())->method('getAllImplementationClassNamesForInterface')->with('TYPO3\\Flow\\Validation\\Validator\\ValidatorInterface')->will($this->returnValue(array('TYPO3\\Flow\\Validation\\Validator\\FooValidator')));
     $this->assertSame('TYPO3\\Flow\\Validation\\Validator\\FooValidator', $this->validatorResolver->_call('resolveValidatorObjectName', 'Foo'));
 }
 /**
  * @test
  */
 public function parseSetsDefaultValueOfRoutePartsRecursively()
 {
     $this->route->setUriPattern('{foo.bar}');
     $this->route->setRoutePartsConfiguration(array('foo.bar' => array('handler' => 'SomeRoutePartHandler')));
     $this->route->setDefaults(array('foo' => array('bar' => 'SomeDefaultValue')));
     $mockRoutePartHandler = $this->getMock(\TYPO3\Flow\Mvc\Routing\DynamicRoutePartInterface::class);
     $mockRoutePartHandler->expects($this->once())->method('setDefaultValue')->with('SomeDefaultValue');
     $this->mockObjectManager->expects($this->once())->method('get')->with('SomeRoutePartHandler')->will($this->returnValue($mockRoutePartHandler));
     $this->route->parse();
 }
 /**
  * @return void
  */
 public function setUp()
 {
     $this->dispatchComponent = new DispatchComponent();
     $this->mockComponentContext = $this->getMockBuilder('TYPO3\\Flow\\Http\\Component\\ComponentContext')->disableOriginalConstructor()->getMock();
     $this->mockHttpRequest = $this->getMockBuilder('TYPO3\\Flow\\Http\\Request')->disableOriginalConstructor()->getMock();
     $this->mockComponentContext->expects($this->any())->method('getHttpRequest')->will($this->returnValue($this->mockHttpRequest));
     $this->mockHttpResponse = $this->getMockBuilder('TYPO3\\Flow\\Http\\Response')->disableOriginalConstructor()->getMock();
     $this->mockComponentContext->expects($this->any())->method('getHttpResponse')->will($this->returnValue($this->mockHttpResponse));
     $this->mockDispatcher = $this->getMockBuilder('TYPO3\\Flow\\Mvc\\Dispatcher')->getMock();
     $this->inject($this->dispatchComponent, 'dispatcher', $this->mockDispatcher);
     $this->mockActionRequest = $this->getMockBuilder('TYPO3\\Flow\\Mvc\\ActionRequest')->disableOriginalConstructor()->getMock();
     $this->mockObjectManager = $this->getMockBuilder('TYPO3\\Flow\\Object\\ObjectManagerInterface')->getMock();
     $this->mockObjectManager->expects($this->any())->method('get')->with('TYPO3\\Flow\\Mvc\\ActionRequest', $this->mockHttpRequest)->will($this->returnValue($this->mockActionRequest));
     $this->inject($this->dispatchComponent, 'objectManager', $this->mockObjectManager);
     $this->mockSecurityContext = $this->getMockBuilder('TYPO3\\Flow\\Security\\Context')->getMock();
     $this->inject($this->dispatchComponent, 'securityContext', $this->mockSecurityContext);
     $this->mockPropertyMappingConfiguration = $this->getMockBuilder('TYPO3\\Flow\\Property\\PropertyMappingConfiguration')->disableOriginalConstructor()->getMock();
     $this->inject($this->dispatchComponent, 'propertyMappingConfiguration', $this->mockPropertyMappingConfiguration);
     $this->mockPropertyMapper = $this->getMockBuilder('TYPO3\\Flow\\Property\\PropertyMapper')->disableOriginalConstructor()->getMock();
     $this->inject($this->dispatchComponent, 'propertyMapper', $this->mockPropertyMapper);
 }
 /**
  * @test
  * @expectedException \TYPO3\Flow\Property\Exception\InvalidTargetException
  */
 public function convertFromShouldThrowExceptionIfRequiredConstructorParameterWasNotFound()
 {
     $source = array('propertyX' => 'bar');
     $object = new ClassWithSettersAndConstructor('param1');
     $convertedChildProperties = array('property2' => 'bar');
     $this->mockReflectionService->expects($this->once())->method('hasMethod')->with(\TYPO3\Flow\Fixtures\ClassWithSettersAndConstructor::class, '__construct')->will($this->returnValue(true));
     $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with(\TYPO3\Flow\Fixtures\ClassWithSettersAndConstructor::class, '__construct')->will($this->returnValue(array('property1' => array('optional' => false, 'type' => null))));
     $this->mockObjectManager->expects($this->once())->method('getClassNameByObjectName')->with(\TYPO3\Flow\Fixtures\ClassWithSettersAndConstructor::class)->will($this->returnValue(\TYPO3\Flow\Fixtures\ClassWithSettersAndConstructor::class));
     $configuration = $this->buildConfiguration(array(PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED => true));
     $result = $this->converter->convertFrom($source, \TYPO3\Flow\Fixtures\ClassWithSettersAndConstructor::class, $convertedChildProperties, $configuration);
     $this->assertSame($object, $result);
 }
 /**
  * @test
  */
 public function handleInjectsActionRequestToSecurityContext()
 {
     $mockWidgetId = 'SomeWidgetId';
     $mockControllerObjectName = 'SomeControllerObjectName';
     $this->mockHttpRequest->expects($this->at(0))->method('hasArgument')->with('__widgetId')->will($this->returnValue(true));
     $this->mockHttpRequest->expects($this->atLeastOnce())->method('getArgument')->with('__widgetId')->will($this->returnValue($mockWidgetId));
     $mockWidgetContext = $this->getMockBuilder(\TYPO3\Fluid\Core\Widget\WidgetContext::class)->getMock();
     $mockWidgetContext->expects($this->atLeastOnce())->method('getControllerObjectName')->will($this->returnValue($mockControllerObjectName));
     $this->mockAjaxWidgetContextHolder->expects($this->atLeastOnce())->method('get')->with($mockWidgetId)->will($this->returnValue($mockWidgetContext));
     $mockActionRequest = $this->getMockBuilder(\TYPO3\Flow\Mvc\ActionRequest::class)->disableOriginalConstructor()->getMock();
     $this->mockObjectManager->expects($this->atLeastOnce())->method('get')->with(\TYPO3\Flow\Mvc\ActionRequest::class)->will($this->returnValue($mockActionRequest));
     $this->mockSecurityContext->expects($this->once())->method('setRequest')->with($mockActionRequest);
     $this->ajaxWidgetComponent->handle($this->mockComponentContext);
 }
 /**
  * Sets up this test case
  */
 public function setUp()
 {
     $this->routerCachingService = $this->getAccessibleMock(\TYPO3\Flow\Mvc\Routing\RouterCachingService::class, array('dummy'));
     $this->mockRouteCache = $this->getMockBuilder(\TYPO3\Flow\Cache\Frontend\VariableFrontend::class)->disableOriginalConstructor()->getMock();
     $this->inject($this->routerCachingService, 'routeCache', $this->mockRouteCache);
     $this->mockResolveCache = $this->getMockBuilder(\TYPO3\Flow\Cache\Frontend\StringFrontend::class)->disableOriginalConstructor()->getMock();
     $this->inject($this->routerCachingService, 'resolveCache', $this->mockResolveCache);
     $this->mockPersistenceManager = $this->getMockBuilder(\TYPO3\Flow\Persistence\PersistenceManagerInterface::class)->getMock();
     $this->inject($this->routerCachingService, 'persistenceManager', $this->mockPersistenceManager);
     $this->mockSystemLogger = $this->getMockBuilder(\TYPO3\Flow\Log\SystemLoggerInterface::class)->getMock();
     $this->inject($this->routerCachingService, 'systemLogger', $this->mockSystemLogger);
     $this->mockObjectManager = $this->getMockBuilder(ObjectManagerInterface::class)->getMock();
     $this->mockApplicationContext = $this->getMockBuilder(ApplicationContext::class)->disableOriginalConstructor()->getMock();
     $this->mockObjectManager->expects($this->any())->method('getContext')->will($this->returnValue($this->mockApplicationContext));
     $this->inject($this->routerCachingService, 'objectManager', $this->mockObjectManager);
     $this->inject($this->routerCachingService, 'objectManager', $this->mockObjectManager);
     $this->mockHttpRequest = $this->getMockBuilder(\TYPO3\Flow\Http\Request::class)->disableOriginalConstructor()->getMock();
     $this->mockHttpRequest->expects($this->any())->method('getMethod')->will($this->returnValue('GET'));
     $this->mockHttpRequest->expects($this->any())->method('getRelativePath')->will($this->returnValue('some/route/path'));
     $this->mockUri = $this->getMockBuilder(\TYPO3\Flow\Http\Uri::class)->disableOriginalConstructor()->getMock();
     $this->mockUri->expects($this->any())->method('getHost')->will($this->returnValue('subdomain.domain.com'));
     $this->mockHttpRequest->expects($this->any())->method('getUri')->will($this->returnValue($this->mockUri));
 }
 /**
  * @test
  */
 public function convertFromUsesPropertyMapperToConvertNodePropertyOfArrayType()
 {
     $contextPath = '/foo/bar@user-demo';
     $nodePath = '/foo/bar';
     $nodeTypeProperties = array('assets' => array('type' => 'array<TYPO3\\Media\\Domain\\Model\\Asset>'));
     $decodedPropertyValue = array('8aaf4dd2-bd85-11e3-ae3d-14109fd7a2dd', '8febe94a-bd85-11e3-8401-14109fd7a2dd');
     $source = array('__contextNodePath' => $contextPath, 'assets' => json_encode($decodedPropertyValue));
     $convertedPropertyValue = array(new \stdClass(), new \stdClass());
     $mockNode = $this->setUpNodeWithNodeType($nodePath, $nodeTypeProperties);
     $this->mockObjectManager->expects($this->any())->method('isRegistered')->with('TYPO3\\Media\\Domain\\Model\\Asset')->will($this->returnValue(true));
     $this->mockPropertyMapper->expects($this->once())->method('convert')->with($decodedPropertyValue, $nodeTypeProperties['assets']['type'])->will($this->returnValue($convertedPropertyValue));
     $mockNode->expects($this->once())->method('setProperty')->with('assets', $convertedPropertyValue);
     $this->nodeConverter->convertFrom($source, null, array(), $this->mockConverterConfiguration);
 }
 /**
  * @test
  */
 public function parseDesignatorMethodAnnotatedWithObservesAnnotationPropertyConstraints()
 {
     $this->mockObjectManager->expects($this->any())->method('get')->will($this->returnValue($this->getMock(\TYPO3\Flow\Log\SystemLoggerInterface::class)));
     $pointcutFilterComposite = new \TYPO3\Flow\Aop\Pointcut\PointcutFilterComposite();
     $parser = $this->getAccessibleMock(\TYPO3\Flow\Aop\Pointcut\PointcutExpressionParser::class, array('dummy'), array(), '', false);
     $parser->injectReflectionService($this->mockReflectionService);
     $parser->injectObjectManager($this->mockObjectManager);
     $parser->_call('parseDesignatorMethodAnnotatedWith', '&&', 'foo(bar == FALSE)', $pointcutFilterComposite);
     $expectedAnnotation = 'foo';
     $expectedAnnotationValueConstraints = array('bar' => array('operator' => array(0 => '=='), 'value' => array(0 => 'FALSE')));
     $filters = \TYPO3\Flow\Reflection\ObjectAccess::getProperty($pointcutFilterComposite, 'filters', true);
     $filter = $filters[0][1];
     $annotation = \TYPO3\Flow\Reflection\ObjectAccess::getProperty($filter, 'annotation', true);
     $annotationValueConstraints = \TYPO3\Flow\Reflection\ObjectAccess::getProperty($filter, 'annotationValueConstraints', true);
     $this->assertEquals($expectedAnnotation, $annotation);
     $this->assertEquals($expectedAnnotationValueConstraints, $annotationValueConstraints);
 }
 /**
  * @test
  */
 public function setChildNodesAddsChildNodesToWidgetContext()
 {
     $this->widgetContext = new \TYPO3\Fluid\Core\Widget\WidgetContext();
     $this->viewHelper->injectWidgetContext($this->widgetContext);
     $node1 = $this->getMock(\TYPO3\Fluid\Core\Parser\SyntaxTree\AbstractNode::class);
     $node2 = $this->getMock(\TYPO3\Fluid\Core\Parser\SyntaxTree\TextNode::class, array(), array(), '', FALSE);
     $node3 = $this->getMock(\TYPO3\Fluid\Core\Parser\SyntaxTree\AbstractNode::class);
     $rootNode = new \TYPO3\Fluid\Core\Parser\SyntaxTree\RootNode();
     $rootNode->addChildNode($node1);
     $rootNode->addChildNode($node2);
     $rootNode->addChildNode($node3);
     $this->objectManager->expects($this->once())->method('get')->with(\TYPO3\Fluid\Core\Parser\SyntaxTree\RootNode::class)->will($this->returnValue($rootNode));
     $renderingContext = $this->getMock(\TYPO3\Fluid\Core\Rendering\RenderingContextInterface::class);
     $this->viewHelper->_set('renderingContext', $renderingContext);
     $this->viewHelper->setChildNodes(array($node1, $node2, $node3));
     $this->assertEquals($rootNode, $this->widgetContext->getViewHelperChildNodes());
 }
 /**
  * @return void
  */
 public function setUp()
 {
     $this->dispatchComponent = new DispatchComponent();
     $this->mockComponentContext = $this->getMockBuilder(ComponentContext::class)->disableOriginalConstructor()->getMock();
     $this->mockHttpRequest = $this->getMockBuilder(Request::class)->disableOriginalConstructor()->getMock();
     $this->mockComponentContext->expects($this->any())->method('getHttpRequest')->will($this->returnValue($this->mockHttpRequest));
     $this->mockHttpResponse = $this->getMockBuilder(Response::class)->disableOriginalConstructor()->getMock();
     $this->mockComponentContext->expects($this->any())->method('getHttpResponse')->will($this->returnValue($this->mockHttpResponse));
     $this->mockDispatcher = $this->getMockBuilder(Dispatcher::class)->getMock();
     $this->inject($this->dispatchComponent, 'dispatcher', $this->mockDispatcher);
     $this->mockActionRequest = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->getMock();
     $mockMediaTypeConverter = $this->getMock(MediaTypeConverterInterface::class);
     $this->mockObjectManager = $this->getMockBuilder(ObjectManagerInterface::class)->getMock();
     $this->mockObjectManager->expects($this->any())->method('get')->willReturnMap([[ActionRequest::class, $this->mockHttpRequest, $this->mockActionRequest], [MediaTypeConverterInterface::class, $mockMediaTypeConverter]]);
     $this->inject($this->dispatchComponent, 'objectManager', $this->mockObjectManager);
     $this->mockSecurityContext = $this->getMockBuilder(Context::class)->getMock();
     $this->inject($this->dispatchComponent, 'securityContext', $this->mockSecurityContext);
     $this->mockPropertyMapper = $this->getMockBuilder(PropertyMapper::class)->disableOriginalConstructor()->getMock();
     $this->inject($this->dispatchComponent, 'propertyMapper', $this->mockPropertyMapper);
 }
 public function setUp()
 {
     $this->mockReflectionService = $this->getMockBuilder(\TYPO3\Flow\Reflection\ReflectionService::class)->disableOriginalConstructor()->getMock();
     $this->mockObjectManager = $this->createMock(\TYPO3\Flow\Object\ObjectManagerInterface::class);
     $this->mockObjectManager->expects($this->any())->method('get')->with(\TYPO3\Flow\Reflection\ReflectionService::class)->will($this->returnValue($this->mockReflectionService));
 }
 public function setUp()
 {
     $this->mockReflectionService = $this->getMock(\TYPO3\Flow\Reflection\ReflectionService::class, array(), array(), '', false);
     $this->mockObjectManager = $this->getMock(\TYPO3\Flow\Object\ObjectManagerInterface::class);
     $this->mockObjectManager->expects($this->any())->method('get')->with(\TYPO3\Flow\Reflection\ReflectionService::class)->will($this->returnValue($this->mockReflectionService));
 }
 /**
  * @test
  * @expectedException \TYPO3\Flow\Http\Component\Exception
  */
 public function createThrowsExceptionIfComponentClassNameDoesNotImplementComponentInterface()
 {
     $chainConfiguration = array('foo' => array('component' => 'Foo\\Component\\ClassName'));
     $this->mockObjectManager->expects($this->at(0))->method('get')->with('Foo\\Component\\ClassName')->will($this->returnValue(new \stdClass()));
     $this->componentChainFactory->create($chainConfiguration);
 }
 public function setUp()
 {
     $this->mockReflectionService = $this->getMock('TYPO3\\Flow\\Reflection\\ReflectionService', array(), array(), '', FALSE);
     $this->mockObjectManager = $this->getMock('TYPO3\\Flow\\Object\\ObjectManagerInterface');
     $this->mockObjectManager->expects($this->any())->method('get')->with('TYPO3\\Flow\\Reflection\\ReflectionService')->will($this->returnValue($this->mockReflectionService));
 }