replacement @expectedException to setExpectedException

This commit is contained in:
Vyacheslav Agafonov
2011-12-01 17:35:13 +04:00
parent c214995796
commit 66857702b6
7 changed files with 22 additions and 46 deletions

View File

@ -80,16 +80,13 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
$this->assertTrue($driver->isConnected());
}
/**
* @expectedException GeneralException
* @expectedExceptionMessage Unknown database
*/
public function testGetConnectionWrongConfig()
{
if (!defined('DEBUG')) {
define('DEBUG', false);
}
$this->setExpectedException('GeneralException', 'Unknown database \'nodb\'');
$this->conf['database'] = 'nodb';
$driver = new MySQLiDriver($this->conf);
$this->assertNull('mysqli', $driver->getConnection());