| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function testParseDate_Year_Month_Day_Time() { |
||
| 34 | $timeValue = $this->createMock( \SMWTimeValue::class ); |
||
| 35 | |||
| 36 | $timeValue->expects( $this->any() ) |
||
| 37 | ->method( 'getYear' ) |
||
| 38 | ->will( $this->returnValue( 2000 ) ); |
||
| 39 | |||
| 40 | $timeValue->expects( $this->any() ) |
||
| 41 | ->method( 'getMonth' ) |
||
| 42 | ->will( $this->returnValue( 12 ) ); |
||
| 43 | |||
| 44 | $timeValue->expects( $this->any() ) |
||
| 45 | ->method( 'getDay' ) |
||
| 46 | ->will( $this->returnValue( 12 ) ); |
||
| 47 | |||
| 48 | $timeValue->expects( $this->any() ) |
||
| 49 | ->method( 'getTimeString' ) |
||
| 50 | ->will( $this->returnValue( '12:01:01' ) ); |
||
| 51 | |||
| 52 | $instance = new DateParser(); |
||
| 53 | |||
| 54 | $this->assertSame( |
||
| 55 | '20001212T120101', |
||
| 56 | $instance->parseDate( $timeValue, true ) |
||
| 57 | ); |
||
| 58 | } |
||
| 59 | |||
| 61 |