/** * @test */ public function filterByPrefixWork() { $index1 = new \TYPO3\Flow\Aop\Builder\ClassNameIndex(); $index1->setClassNames(array('\\Foo\\Bar', '\\Foo\\Baz', '\\Bar\\Baz', '\\Foo\\Blubb')); // We need to call sort manually! $index1->sort(); $filteredIndex = $index1->filterByPrefix('\\Foo'); $this->assertEquals(array('\\Foo\\Bar', '\\Foo\\Baz', '\\Foo\\Blubb'), $filteredIndex->getClassNames()); }