Skip to content

Commit

Permalink
Looks like we could not serialize and unserialize PDO instances. Inst…
Browse files Browse the repository at this point in the history
…ead I'm using another driver who implements PDOInstanceTrait, and therefore has the quote() method. I just only need it for stubbing it.
  • Loading branch information
Thomas Lefebvre committed Jun 29, 2016
1 parent f991d31 commit 2ac2272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/TestCase/Database/DriverTest.php
Expand Up @@ -15,11 +15,11 @@
namespace Cake\Test\TestCase\Database;

use Cake\Database\Driver;
use Cake\Database\Mysql;
use Cake\Database\Query;
use Cake\Database\QueryCompiler;
use Cake\Database\ValueBinder;
use Cake\TestSuite\TestCase;
use PDO;

/**
* Tests Driver class
Expand Down Expand Up @@ -99,7 +99,7 @@ public function testSupportsQuoting()
*/
public function testSchemaValue($input, $expected)
{
$this->driver->_connection = $this->getMockBuilder(PDO::class)
$this->driver->_connection = $this->getMockBuilder(Mysql::class)
->disableOriginalConstructor()
->setMethods(['quote'])
->getMock();
Expand All @@ -120,7 +120,7 @@ public function testSchemaValue($input, $expected)
*/
public function testLastInsertId()
{
$connection = $this->getMockBuilder(PDO::class)
$connection = $this->getMockBuilder(Mysql::class)
->disableOriginalConstructor()
->setMethods(['lastInsertId'])
->getMock();
Expand Down

0 comments on commit 2ac2272

Please sign in to comment.