diff options
author | Davey Shafik <me@daveyshafik.com> | 2016-02-03 03:03:12 -0500 |
---|---|---|
committer | Davey Shafik <me@daveyshafik.com> | 2016-02-03 03:03:51 -0500 |
commit | 743bc7fcac808b9048e6f1266cc93202b5d66e63 (patch) | |
tree | 1d4f5ec4cb4b0c1e3578ed52b65f175ac62a8f3a | |
parent | f0ea8a8e3dc476e5deb1e6ef0c4dbe6237fe8459 (diff) | |
download | php7-mysql-shim-743bc7fcac808b9048e6f1266cc93202b5d66e63.zip php7-mysql-shim-743bc7fcac808b9048e6f1266cc93202b5d66e63.tar.gz php7-mysql-shim-743bc7fcac808b9048e6f1266cc93202b5d66e63.tar.bz2 |
Use `\SebastianBergmann\Environment\Runtime->isHHVM()`
-rw-r--r-- | tests/MySqlShimTest.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/MySqlShimTest.php b/tests/MySqlShimTest.php index ccaeec8..f8d8f62 100644 --- a/tests/MySqlShimTest.php +++ b/tests/MySqlShimTest.php @@ -17,6 +17,13 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase static $container; static $bin = []; + protected $runtime; + + public function __construct() + { + $this->runtime = new \SebastianBergmann\Environment\Runtime(); + } + public function test_mysql_connect() { $mysql = mysql_connect(static::$host, 'root'); @@ -286,6 +293,9 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase } } + /** + * @requires PHP + */ public function test_mysql_list_tables_fail() { $this->skipForHHVM(); @@ -1031,7 +1041,7 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase protected function skipForHHVM($condition = true) { - if (defined('HHVM_VERSION') && $condition) { + if ($this->runtime->isHHVM() && $condition) { $this->markTestSkipped("HHVM Behavior differs from PHP"); } } |