Skip to content

Commit

Permalink
ReportSenderJob: Fix test, add getter
Browse files Browse the repository at this point in the history
  • Loading branch information
josefbenjac committed Jan 24, 2018
1 parent 827d5b2 commit e1d0990
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/ReportSenderJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,12 @@ public function run()
$this->reportSender->send($this->feed);
}

/**
* @return Feed
*/
public function getFeed()
{
return $this->feed;
}

}
5 changes: 3 additions & 2 deletions tests/ReportSenderJobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ public function testIsDue()

$job = new ReportSenderJob($feed, $reportSender);

self::assertTrue($job->isDue(new \DateTime('1 minute')));
self::assertFalse($job->isDue(new \DateTime('2 minute')));
self::assertTrue($job->isDue(new \DateTime('2000-01-01 00:00')));
self::assertFalse($job->isDue(new \DateTime('2000-01-01 00:01')));
self::assertSame($feed, $job->getFeed());
}

/**
Expand Down

0 comments on commit e1d0990

Please sign in to comment.