Esempio n. 1
0
 function testMonthStart()
 {
     $sql = 'SELECT ' . $this->pdoSQLite->monthStart("'2014-07-25 15:01:19'");
     $expected = '2014-07-01';
     $actual = $this->pdoSQLite->query($sql)->fetchColumn();
     $this->assertEquals($expected, $actual, $sql . ' should have returned ' . $expected);
     $sql = 'SELECT ' . $this->pdoSQLite->monthStart("'bad date'");
     $actual = $this->pdoSQLite->query($sql)->fetchColumn();
     $this->assertNull($actual, $sql . ' should have returned null');
 }