16 public function testGetDateCond( $inputYear, $inputMonth, $inputDay, $expected ) {
17 $pager = $this->getMockForAbstractClass(
'RangeChronologicalPager' );
20 wfTimestamp( TS_MW, $pager->getDateCond( $inputYear, $inputMonth, $inputDay ) )
29 [ 2016, 12, 5,
'20161205235959' ],
30 [ 2016, 12, 31,
'20161231235959' ],
31 [ 2016, 12, 1337,
'20161231235959' ],
32 [ 2016, 1337, 1337,
'20161231235959' ],
33 [ 2016, 1337, -1,
'20161231235959' ],
34 [ 2016, 12, 32,
'20161231235959' ],
35 [ 2016, 12, -1,
'20161231235959' ],
36 [ 2016, -1, -1,
'20161231235959' ],
45 $pager = $this->getMockForAbstractClass(
'RangeChronologicalPager' );
60 '>=' .
$db->addQuotes(
$db->timestamp(
'20161201000000' ) ),
61 '<=' .
$db->addQuotes(
$db->timestamp(
'20161203000000' ) ),
68 '<=' .
$db->addQuotes(
$db->timestamp(
'20161203000000' ) ),
75 '>=' .
$db->addQuotes(
$db->timestamp(
'20161201000000' ) ),
87 $pager = $this->getMockForAbstractClass(
'RangeChronologicalPager' );
88 $this->assertEquals(
null, $pager->getDateRangeCond( $start, $end ) );
93 [
'-2016-12-01',
'2017-12-01', ],
94 [
'2016-12-01',
'-2017-12-01', ],
95 [
'abcdefghij',
'klmnopqrstu', ],