Skip to content

Commit

Permalink
Closing more cursors
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 30, 2014
1 parent b2774d4 commit 9f386c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/TestCase/Database/ConnectionTest.php
Expand Up @@ -361,6 +361,7 @@ public function testDeleteNoConditions() {
$this->connection->delete('things');
$result = $this->connection->execute('SELECT * FROM things');
$this->assertCount(0, $result);
$result->closeCursor();
}

/**
Expand All @@ -371,14 +372,17 @@ public function testDeleteWithConditions() {
$this->connection->delete('things', ['id' => '1-rest-is-ommited'], ['id' => 'integer']);
$result = $this->connection->execute('SELECT * FROM things');
$this->assertCount(1, $result);
$result->closeCursor();

$this->connection->delete('things', ['id' => '1-rest-is-ommited'], ['id' => 'integer']);
$result = $this->connection->execute('SELECT * FROM things');
$this->assertCount(1, $result);
$result->closeCursor();

$this->connection->delete('things', ['id' => '2-rest-is-ommited'], ['id' => 'integer']);
$result = $this->connection->execute('SELECT * FROM things');
$this->assertCount(0, $result);
$result->closeCursor();
}

/**
Expand All @@ -392,6 +396,7 @@ public function testSimpleTransactions() {
$this->connection->rollback();
$result = $this->connection->execute('SELECT * FROM things');
$this->assertCount(2, $result);
$result->closeCursor();

$this->connection->begin();
$this->connection->delete('things', ['id' => 1]);
Expand Down

0 comments on commit 9f386c3

Please sign in to comment.