/** * @test * @author Karsten Dambekalns <*****@*****.**> */ public function getPropertyNamesByTagReturnsEmptyArrayIfNoPropertiesTaggedBySpecifiedTagWhereFound() { $availableClassNames = array('F3\\FLOW3\\Tests\\Reflection\\Fixture\\DummyClass', 'F3\\FLOW3\\Tests\\Reflection\\Fixture\\DummyClassWithProperties'); $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($availableClassNames); $expectedPropertyNames = array(); $detectedPropertyNames = $reflectionService->getPropertyNamesByTag('F3\\FLOW3\\Tests\\Reflection\\Fixture\\DummyClass', 'firsttag'); $this->assertEquals($expectedPropertyNames, $detectedPropertyNames); $detectedPropertyNames = $reflectionService->getPropertyNamesByTag('F3\\FLOW3\\Tests\\Reflection\\Fixture\\DummyClassWithProperties', 'tagnothere'); $this->assertEquals($expectedPropertyNames, $detectedPropertyNames); }