Commit dc6bad0d authored by till's avatar till

Bugfix: coding standard & missing assertion

parent 7d77a3fb
...@@ -1497,9 +1497,10 @@ class Connection implements DriverConnection ...@@ -1497,9 +1497,10 @@ class Connection implements DriverConnection
*/ */
public function ping() public function ping()
{ {
if (!($this->_conn instanceof PingableConnection)) { if ( ! ($this->_conn instanceof PingableConnection)) {
throw ConnectionException::unsupportedFeature('ping'); throw ConnectionException::unsupportedFeature('ping');
} }
return $this->_conn->ping(); return $this->_conn->ping();
} }
} }
...@@ -42,7 +42,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -42,7 +42,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
public function testPing() public function testPing()
{ {
$conn = $this->getConnection(array()); $conn = $this->getConnection(array());
$conn->ping(); $this->assertTrue($conn->ping());
} }
private function getConnection(array $driverOptions) private function getConnection(array $driverOptions)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment