Skip to content

Commit

Permalink
Fix driver specific failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 28, 2017
1 parent c43e414 commit 50d5416
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/TestCase/Database/Driver/MysqlTest.php
Expand Up @@ -150,15 +150,15 @@ public function testRollbackTransactionAutoConnect()
$connection = ConnectionManager::get('test');
$connection->disconnect();

$driver = $connection->driver();
$driver = $connection->getDriver();
$this->assertFalse($driver->rollbackTransaction());
$this->assertTrue($driver->isConnected());
}

public function testCommitTransactionAutoConnect()
{
$connection = ConnectionManager::get('test');
$driver = $connection->driver();
$driver = $connection->getDriver();

$this->assertFalse($driver->commitTransaction());
$this->assertTrue($driver->isConnected());
Expand Down
8 changes: 6 additions & 2 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -4008,8 +4008,12 @@ public function testSqlCaseStatement()

//Postgres requires the case statement to be cast to a integer
if ($this->connection->getDriver() instanceof \Cake\Database\Driver\Postgres) {
$publishedCase = $query->func()->cast([$publishedCase, 'integer' => 'literal'])->type(' AS ');
$notPublishedCase = $query->func()->cast([$notPublishedCase, 'integer' => 'literal'])->type(' AS ');
$publishedCase = $query->func()
->cast([$publishedCase, 'integer' => 'literal'])
->setConjunction(' AS ');
$notPublishedCase = $query->func()
->cast([$notPublishedCase, 'integer' => 'literal'])
->setConjunction(' AS ');
}

$results = $query
Expand Down

0 comments on commit 50d5416

Please sign in to comment.