From 70d7d6ff0b71e40584164f4c38d991f5d9968019 Mon Sep 17 00:00:00 2001 From: Jessica Mauerhan Date: Tue, 22 Mar 2016 19:25:52 -0400 Subject: [PATCH] excluding aspect mock on hhvm --- tests/bootstrap.php | 12 +++++++----- tests/src/TestCase.php | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index b9a60e6..24be238 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,8 +1,10 @@ init([ - 'debug' => true, - 'includePaths' => [__DIR__ . '/../src/Generator'] -]); +if (!defined('HHVM_VERSION')) { + $kernel = \AspectMock\Kernel::getInstance(); + $kernel->init([ + 'debug' => true, + 'includePaths' => [__DIR__ . '/../src/Generator'] + ]); +} \ No newline at end of file diff --git a/tests/src/TestCase.php b/tests/src/TestCase.php index d17abdb..2aaa085 100644 --- a/tests/src/TestCase.php +++ b/tests/src/TestCase.php @@ -51,7 +51,7 @@ class TestCase extends \PHPUnit_Framework_TestCase protected function skipIfHhvm() { - if (getenv('PHP_VERSION') === 'hhvm') { + if (defined('HHVM_VERSION')) { $this->markTestSkipped('Skipping test that cannot run on HHVM'); } }