Skip to content

Commit

Permalink
Add Exception test for unix_socket
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Jan 14, 2014
1 parent 59ef7e8 commit 7f39c90
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/josegonzalez/Queuesadilla/Backend/MysqlBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ public function testConstruct()
$this->assertTrue($Backend->connected());
}

/**
* @covers josegonzalez\Queuesadilla\Backend\MysqlBackend::__construct
* @covers josegonzalez\Queuesadilla\Backend\MysqlBackend::connected
* @expectedException PDOException
*/
public function testConstructException()
{
$config = $this->config;
$config['unix_socket'] = '/tmp/missing/mysql.sock';
$SocketBackend = new MysqlBackend($config);
$this->assertTrue($Backend->connected());
}

/**
* @covers josegonzalez\Queuesadilla\Backend\MysqlBackend::connect
*/
Expand Down

0 comments on commit 7f39c90

Please sign in to comment.