Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul M. Jones committed Aug 8, 2018
1 parent b51fe9a commit b6bca6c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,14 @@ public function testQueryLogging()

public function testStatementLogging()
{
// query logging turned off
$stm = "SELECT id, name FROM pdotest WHERE id = :id";
$sth = $this->connection->prepare($stm);
$this->assertInstanceOf(PDOStatement::class, $sth);
$this->assertTrue($sth->execute(['id' => '0']));
$this->assertSame([], $this->connection->getQueries());

// query logging turned on
$this->connection->logQueries(true);
$stm = "SELECT id, name FROM pdotest WHERE id = :id";
$sth = $this->connection->prepare($stm);
Expand Down

0 comments on commit b6bca6c

Please sign in to comment.