/** * @test */ public function resolveInterceptorReturnsTheCorrectInterceptorForACompleteClassName() { $mockObjectManager = $this->getMock('TYPO3\\Flow\\Object\\ObjectManager', array(), array(), '', FALSE); $mockObjectManager->expects($this->any())->method('getCaseSensitiveObjectName')->with('ExistingInterceptorClass')->will($this->returnValue('ExistingInterceptorClass')); $interceptorResolver = new \TYPO3\Flow\Security\Authorization\InterceptorResolver($mockObjectManager); $interceptorClass = $interceptorResolver->resolveInterceptorClass('ExistingInterceptorClass'); $this->assertEquals('ExistingInterceptorClass', $interceptorClass, 'The wrong classname has been resolved'); }
/** * @test */ public function resolveInterceptorReturnsTheCorrectInterceptorForACompleteClassName() { $mockObjectManager = $this->getMockBuilder(\TYPO3\Flow\Object\ObjectManager::class)->disableOriginalConstructor()->getMock(); $mockObjectManager->expects($this->any())->method('getCaseSensitiveObjectName')->with('ExistingInterceptorClass')->will($this->returnValue('ExistingInterceptorClass')); $interceptorResolver = new \TYPO3\Flow\Security\Authorization\InterceptorResolver($mockObjectManager); $interceptorClass = $interceptorResolver->resolveInterceptorClass('ExistingInterceptorClass'); $this->assertEquals('ExistingInterceptorClass', $interceptorClass, 'The wrong classname has been resolved'); }