public function findAllByName($name) { $appNodes = array(); foreach ($this->findAll() as $appNode) { if ($appNode->getName() == $name) { $appNodes[$appNode->getPrimaryKey()] = $appNode; } } return $appNodes; }
/** * Test if the findAllByName() method returns the correct number of elements. * * @return null */ public function testFindAllByName() { $this->assertCount(2, $this->appService->findAllByName('api')); }