| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function testJobPosterTimeRemaining() |
||
| 39 | { |
||
| 40 | $jobPoster = factory(JobPoster::class)->make( |
||
| 41 | [ |
||
| 42 | 'close_date_time' => date('Y-m-d H:i:s', strtotime('-1 hour')) |
||
| 43 | ] |
||
| 44 | ); |
||
| 45 | $this->assertEquals(Lang::choice('common/time.hour', 1), $jobPoster->timeRemaining()); |
||
| 46 | |||
| 47 | $jobPoster = factory(JobPoster::class)->make( |
||
| 48 | [ |
||
| 49 | 'close_date_time' => date('Y-m-d H:i:s', strtotime('-2 days')) |
||
| 50 | ] |
||
| 51 | ); |
||
| 52 | $langString = Lang::choice('common/time.day', 2); |
||
| 53 | $this->assertEquals($langString, $jobPoster->timeRemaining()); |
||
| 54 | } |
||
| 56 |