Skip to content
Permalink
Browse files

Fixing tests

  • Loading branch information...
lorenzo committed Feb 24, 2018
1 parent b577ed3 commit 029cd960630c7c846b1ea480b31dd3b95449a0e1
@@ -146,7 +146,8 @@ public function toPHP($value, Driver $driver)
return null;
}
$instance = (clone $this->_datetimeInstance)->modify($value);
$instance = clone $this->_datetimeInstance;
$instance = $instance->modify($value);
if ($this->setToDateStart) {
$instance = $instance->setTime(0, 0, 0);
@@ -172,7 +173,8 @@ public function manyToPHP(array $values, array $fields, Driver $driver)
continue;
}
$instance = (clone $this->_datetimeInstance)->modify($values[$field]);
$instance = clone $this->_datetimeInstance;
$instance = $instance->modify($value);
if ($this->setToDateStart) {
$instance = $instance->setTime(0, 0, 0);
@@ -4475,7 +4475,7 @@ public function testCastResults()
'true' => 'boolean'
]);
$results = $query
->select(['one' => '1', 'two' => '2', 'true' => '1', 'three' => '3.0'])
->select(['one' => '1 * 1', 'two' => '1 * 2', 'true' => '1', 'three' => '1 + 2'])
->setSelectTypeMap($typeMap)
->execute()
->fetchAll('assoc');
@@ -104,12 +104,10 @@ public function testManyToPHP()
$values = [
'a' => null,
'b' => '2001-01-04 12:13:14',
'c' => '2001-01-04 12:13:14.12345',
];
$expected = [
'a' => null,
'b' => new Time('2001-01-04 12:13:14'),
'c' => new Time('2001-01-04 12:13:14.12345'),
];
$this->assertEquals(
$expected,
@@ -95,12 +95,10 @@ public function testManyToPHP()
$values = [
'a' => null,
'b' => '01:30:13',
'c' => '12:13:14.12345',
];
$expected = [
'a' => null,
'b' => new Time('01:30:13'),
'c' => new Time('12:13:14.12345'),
];
$this->assertEquals(
$expected,

0 comments on commit 029cd96

Please sign in to comment.
You can’t perform that action at this time.