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