for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SRF\Tests\iCalendar;
use SRF\iCalendar\DateParser;
/**
* @covers \SRF\iCalendar\DateParser
* @group semantic-result-formats
*
* @license GNU GPL v2+
* @since 3.2
* @author mwjames
*/
class DateParserTest extends \PHPUnit_Framework_TestCase {
public function testParseDate_Year() {
$timeValue = $this->createMock( \SMWTimeValue::class );
$timeValue->expects( $this->any() )
->method( 'getYear' )
->will( $this->returnValue( 2000 ) );
$instance = new DateParser();
$this->assertSame(
'20000101',
$instance->parseDate( $timeValue, true )
);
}
public function testParseDate_Year_Month_Day_Time() {
->method( 'getMonth' )
->will( $this->returnValue( 12 ) );
->method( 'getDay' )
->method( 'getTimeString' )
->will( $this->returnValue( '12:01:01' ) );
'20001212T120101',