Skip to content

Commit

Permalink
Make test conditional on sqlite.
Browse files Browse the repository at this point in the history
Only sqlite requires userland buffering.
  • Loading branch information
markstory committed May 25, 2018
1 parent 35dcf38 commit 48c3dc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/TestCase/Database/ConnectionTest.php
Expand Up @@ -24,6 +24,7 @@
use Cake\Database\Retry\CommandRetry;
use Cake\Database\Retry\ReconnectStrategy;
use Cake\Database\StatementInterface;
use Cake\Database\Statement\BufferedStatement;
use Cake\Datasource\ConnectionManager;
use Cake\Log\Log;
use Cake\TestSuite\TestCase;
Expand Down Expand Up @@ -257,9 +258,12 @@ public function testExecuteWithArgumentsAndTypes()
*/
public function testBufferedStatementCollectionWrappingStatement()
{
$this->skipIf(
!($this->connection->getDriver() instanceof \Cake\Database\Driver\Sqlite),
'Only required for SQLite driver which does not support buffered results natively'
);
$this->loadFixtures('Things');
$statement = $this->connection->query('SELECT * FROM things LIMIT 3');
$statement->bufferResults(true);

$collection = new Collection($statement);
$result = $collection->extract('id')->toArray();
Expand Down

0 comments on commit 48c3dc9

Please sign in to comment.