diff options
author | Davey Shafik <me@daveyshafik.com> | 2015-12-07 01:17:48 -0500 |
---|---|---|
committer | Davey Shafik <me@daveyshafik.com> | 2015-12-07 01:17:48 -0500 |
commit | 010f35a25c7ec338e6e3479ea14fc789ad974c58 (patch) | |
tree | ff2497b311dfe53fc5fc3c44d93fa8dde6dcc322 | |
parent | 821f122e59019dee8e141d8a40cce6b4150dfe6b (diff) | |
download | php7-mysql-shim-010f35a25c7ec338e6e3479ea14fc789ad974c58.zip php7-mysql-shim-010f35a25c7ec338e6e3479ea14fc789ad974c58.tar.gz php7-mysql-shim-010f35a25c7ec338e6e3479ea14fc789ad974c58.tar.bz2 |
Skip some tests on HHVM where behavior differs from PHP
-rw-r--r-- | tests/MySqlShimTest.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/MySqlShimTest.php b/tests/MySqlShimTest.php index 460c4a6..2c8adcf 100644 --- a/tests/MySqlShimTest.php +++ b/tests/MySqlShimTest.php @@ -59,9 +59,7 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase public function test_mysql_connect_multi() { - if(defined('HHVM_VERSION')) { - $this->markTestSkipped("HHVM Behavior differs from PHP"); - } + $this->skipForHHVM(); $conn = mysql_connect(static::$host, 'root'); $conn2 = mysql_connect(static::$host, 'root'); @@ -202,6 +200,8 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase public function test_mysql_db_query() { + $this->skipForHHVM(); + $this->getConnection(); $result = mysql_db_query("shim_test", "SELECT DATABASE()"); $this->assertResult($result); @@ -213,6 +213,8 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase public function test_mysql_db_query_fail() { + $this->skipForHHVM(); + $this->getConnection(); $result = mysql_db_query("nonexistent", "SELECT DATABASE()"); $this->assertFalse($result); @@ -259,6 +261,8 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase public function test_mysql_list_fields() { + $this->skipForHHVM(); + $this->getConnection(); $result = mysql_list_fields("shim_test", "testing"); $this->assertResult($result); @@ -941,4 +945,11 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase "Not a valid MySQL connection" ); } + + protected function skipForHHVM() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped("HHVM Behavior differs from PHP"); + } + } } |