public function getAll() { $issues = array(); $data = $this->callAgainstCache(array($this, 'fetchIssues')); foreach ($data['issues'] as $issueData) { $issues[] = Issue::create($issueData); } return $issues; }
/** * @dataProvider provideIssueData */ public function testGetters(array $data) { $issue = Issue::create($data); $this->assertEquals($data['done_ratio'], $issue->getDoneRatio()); $this->assertEquals($data['status'], $issue->getStatus()); $this->assertEquals($data['description'], $issue->getDescription()); $this->assertEquals($data['created_on'], $issue->getCreatedOn()); $this->assertEquals($data['subject'], $issue->getSubject()); $this->assertEquals($data['author'], $issue->getAuthor()); $this->assertEquals($data['start_date'], $issue->getStartDate()); $this->assertEquals($data['updated_on'], $issue->getUpdatedOn()); $this->assertEquals($data['assigned_to'], $issue->getAssignedTo()); $this->assertEquals($data['tracker'], $issue->getTracker()); $this->assertEquals($data['project'], $issue->getProject()); $this->assertEquals($data['id'], $issue->getId()); $this->assertEquals($data['priority'], $issue->getPriority()); }