public function getAll() { $projects = array(); $data = $this->callAgainstCache(array($this, 'fetchProjects')); foreach ($data['projects'] as $projectData) { $projects[] = Project::create($projectData); } return $projects; }
/** * @dataProvider provideProjectData */ public function testGetters(array $data) { $project = Project::create($data); $this->assertEquals($data['identifier'], $project->getIdentifier()); $this->assertEquals($data['description'], $project->getDescription()); $this->assertEquals($data['created_on'], $project->getCreatedOn()); $this->assertEquals($data['updated_on'], $project->getUpdatedOn()); $this->assertEquals($data['parent'], $project->getParent()); $this->assertEquals($data['name'], $project->getName()); $this->assertEquals($data['id'], $project->getId()); }