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