| Total Complexity | 1 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class DateFormatterDayOfYearTest extends \PHPUnit_Framework_TestCase |
||
| 9 | { |
||
| 10 | public function testFormat() |
||
| 11 | { |
||
| 12 | $dayOfYear = 3; |
||
| 13 | $date = m::mock(\DateTimeImmutable::class) |
||
| 14 | ->shouldReceive('format') |
||
| 15 | ->with('z') |
||
| 16 | ->andReturn($dayOfYear) |
||
| 17 | ->getMock(); |
||
| 18 | $format = 'i am format'; |
||
| 19 | |||
| 20 | $formatter = new DateFormatterDayOfYear(); |
||
| 21 | $actual = $formatter->format($date, $format); |
||
| 22 | |||
| 23 | $this->assertSame('4', $actual); |
||
| 24 | } |
||
| 26 |