Skip to content

Commit

Permalink
Finish Connection coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Gusakov Nikita committed Apr 21, 2014
1 parent 4d2c661 commit 2286a2a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public function testFluent()
$this->assertSame($this->connection, $this->connection->beginTransaction());
$this->connection->query("INSERT INTO users(username) VALUES('John Doe')");
$this->assertSame($this->connection, $this->connection->rollback());

$this->connection->beginTransaction();

$this->assertSame($this->connection, $this->connection->commit());
$this->assertEmpty($this->connection->query('SELECT * FROM users')->fetchAll());
}

Expand All @@ -44,4 +48,13 @@ public function testParser()
'lob' => \PDO::PARAM_LOB
), $this->getObjectAttribute($stmt, 'types'));
}

public function testInvoke()
{
$connection = $this->connection;
$this->assertEquals(
$connection->prepare('SELECT * FROM users'),
$connection('SELECT * FROM users')
);
}
}

0 comments on commit 2286a2a

Please sign in to comment.