public function load($uuid) { foreach ($this->findAll() as $datasourceNode) { if ($datasourceNode->getPrimaryKey() == $uuid) { return $datasourceNode; } } }
/** * Test if the load() method returns the NULL for an invalid primary key. * * @return null */ public function testLoadWithInvalidPrimaryKey() { $this->assertNull($this->service->load('invalidPrimaryKey')); }