/**
  * If two classes implement an interface, the Reflection Service checks if one of them is
  * a proxy (implements the Proxy marker interface). If that is the case, it's sure that the
  * other class is the original (target) class. In case these conditions are met, the name
  * of the proxy class is returned.
  *
  * @test
  * @author Robert Lemke <*****@*****.**>
  * @see http://typo3.org/go/issue/3027
  */
 public function getDefaultImplementationClassNameForInterfaceReturnsClassNameOfTheProxyIfTwoClassesWereFound()
 {
     $classNames = array('F3\\FLOW3\\Tests\\Reflection\\Fixture\\DummyInterface1', 'F3\\FLOW3\\Tests\\Reflection\\Fixture\\ImplementationOfDummyInterface1', 'F3\\FLOW3\\Tests\\Reflection\\Fixture\\ProxyOfImplementationOfDummyInterface1');
     $reflectionService = new \F3\FLOW3\Reflection\ReflectionService();
     $reflectionService->setStatusCache($this->getMock('F3\\FLOW3\\Cache\\Frontend\\StringFrontend', array(), array(), '', FALSE));
     $reflectionService->setDataCache($this->getMock('F3\\FLOW3\\Cache\\Frontend\\VariableFrontend', array(), array(), '', FALSE));
     $reflectionService->injectSystemLogger($this->getMock('F3\\FLOW3\\Log\\SystemLoggerInterface'));
     $reflectionService->initialize($classNames);
     $className = $reflectionService->getDefaultImplementationClassNameForInterface('F3\\FLOW3\\Tests\\Reflection\\Fixture\\DummyInterface1');
     $this->assertEquals('F3\\FLOW3\\Tests\\Reflection\\Fixture\\ProxyOfImplementationOfDummyInterface1', $className, 'Proxy registered second.');
     $classNames = array('F3\\FLOW3\\Tests\\Reflection\\Fixture\\DummyInterface1', 'F3\\FLOW3\\Tests\\Reflection\\Fixture\\ProxyOfImplementationOfDummyInterface1', 'F3\\FLOW3\\Tests\\Reflection\\Fixture\\ImplementationOfDummyInterface1');
     $reflectionService = new \F3\FLOW3\Reflection\ReflectionService();
     $reflectionService->setStatusCache($this->getMock('F3\\FLOW3\\Cache\\Frontend\\StringFrontend', array(), array(), '', FALSE));
     $reflectionService->setDataCache($this->getMock('F3\\FLOW3\\Cache\\Frontend\\VariableFrontend', array(), array(), '', FALSE));
     $reflectionService->injectSystemLogger($this->getMock('F3\\FLOW3\\Log\\SystemLoggerInterface'));
     $reflectionService->initialize($classNames);
     $className = $reflectionService->getDefaultImplementationClassNameForInterface('F3\\FLOW3\\Tests\\Reflection\\Fixture\\DummyInterface1');
     $this->assertEquals('F3\\FLOW3\\Tests\\Reflection\\Fixture\\ProxyOfImplementationOfDummyInterface1', $className, 'Proxy registered first.');
 }