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