diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/MySqlShimTest.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/MySqlShimTest.php b/tests/MySqlShimTest.php index 9b91bf3..1a39ff3 100644 --- a/tests/MySqlShimTest.php +++ b/tests/MySqlShimTest.php @@ -48,11 +48,17 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase * @expectedException \PHPUnit_Framework_Error_Warning * @expectedExceptionMessageRegExp /^mysql(i?)_connect\(\): (\(HY000\/1045\): )?Access denied for user 'baduser'@'(.*?)' \(using password: YES\)$/ */ - public function test_mysql_connect_fail() + public function test_mysql_connect_fail_warning() { $mysql = mysql_connect(static::$host, "baduser", "badpass"); } + public function test_mysql_connect_fail_false() + { + $mysql = @mysql_connect(static::$host, "baduser", "badpass"); + $this->assertFalse($mysql); + } + /** * @expectedException \PHPUnit_Framework_Error_Warning * @expectedExceptionMessage Argument $new is no longer supported in PHP > 7 |