fix typos found due to testing

This commit is contained in:
Dennis Eichhorn 2019-12-21 16:01:55 +01:00
parent 1262310af9
commit f704dfdeff
2 changed files with 5 additions and 5 deletions

View File

@ -356,7 +356,7 @@ class Grammar extends GrammarAbstract
} elseif ($value instanceof \Serializable) { } elseif ($value instanceof \Serializable) {
return $value->serialize(); return $value->serialize();
} elseif ($value instanceof Parameter) { } elseif ($value instanceof Parameter) {
return $value->_toString(); return $value->__toString();
} else { } else {
throw new \InvalidArgumentException(\gettype($value)); throw new \InvalidArgumentException(\gettype($value));
} }

View File

@ -161,10 +161,10 @@ class SmartDateTimeTest extends \PHPUnit\Framework\TestCase
*/ */
public function testEndOfDay() : void public function testEndOfDay() : void
{ {
$expected = new \DateTime('2019-11-17'); $expected = new \DateTime('2019-11-21');
$obj = new SmartDateTime('2019-11-21'); $obj = new SmartDateTime('2019-11-21');
self::assertEquals($expected->format('Y-m-d') . '23:59:59', $obj->getEndOfDay()->format('Y-m-d H:i:s')); self::assertEquals($expected->format('Y-m-d') . ' 23:59:59', $obj->getEndOfDay()->format('Y-m-d H:i:s'));
} }
/** /**
@ -174,10 +174,10 @@ class SmartDateTimeTest extends \PHPUnit\Framework\TestCase
*/ */
public function testStartOfDay() : void public function testStartOfDay() : void
{ {
$expected = new \DateTime('2019-11-17'); $expected = new \DateTime('2019-11-21');
$obj = new SmartDateTime('2019-11-21'); $obj = new SmartDateTime('2019-11-21');
self::assertEquals($expected->format('Y-m-d') . '00:00:00', $obj->getStartOfDay()->format('Y-m-d H:i:s')); self::assertEquals($expected->format('Y-m-d') . ' 00:00:00', $obj->getStartOfDay()->format('Y-m-d H:i:s'));
} }
/** /**