diff --git a/tests/Generator/DefaultTimeGeneratorTest.php b/tests/Generator/DefaultTimeGeneratorTest.php index f5b11ca3..9691fa03 100644 --- a/tests/Generator/DefaultTimeGeneratorTest.php +++ b/tests/Generator/DefaultTimeGeneratorTest.php @@ -45,9 +45,7 @@ protected function tearDown() $this->nodeProvider = null; $this->timeConverter = null; Mockery::close(); - if (!self::isHhvm()) { - AspectMock::clean(); - } + AspectMock::clean(); } public function testGenerateUsesNodeProviderWhenNodeIsNull() @@ -170,7 +168,6 @@ public function testGenerateUsesRandomSequenceWhenClockSeqNull() { $expectedBytes = hex2bin('0000000000001000a596122f80ca9e06'); - $this->skipIfHhvm(); $mt_rand = AspectMock::func('Ramsey\Uuid\Generator', 'mt_rand', 9622); $defaultTimeGenerator = new DefaultTimeGenerator( $this->nodeProvider, diff --git a/tests/Generator/OpenSslGeneratorTest.php b/tests/Generator/OpenSslGeneratorTest.php index 0a989134..5a1756ca 100644 --- a/tests/Generator/OpenSslGeneratorTest.php +++ b/tests/Generator/OpenSslGeneratorTest.php @@ -13,12 +13,6 @@ */ class OpenSslGeneratorTest extends TestCase { - protected function setUp() - { - $this->skipIfHhvm(); - parent::setUp(); - } - public function lengthAndHexDataProvider() { return [ diff --git a/tests/Generator/PeclUuidTestCase.php b/tests/Generator/PeclUuidTestCase.php index 246dbf7d..9cc20552 100644 --- a/tests/Generator/PeclUuidTestCase.php +++ b/tests/Generator/PeclUuidTestCase.php @@ -8,10 +8,4 @@ class PeclUuidTestCase extends TestCase { protected $uuidString = 'b08c6fff-7dc5-e111-9b21-0800200c9a66'; protected $uuidBinary = '62303863366666662d376463352d653131312d396232312d303830303230306339613636'; - - protected function setUp() - { - $this->skipIfHhvm(); - parent::setUp(); - } } diff --git a/tests/Generator/RandomBytesGeneratorTest.php b/tests/Generator/RandomBytesGeneratorTest.php index b0008f98..9a758879 100644 --- a/tests/Generator/RandomBytesGeneratorTest.php +++ b/tests/Generator/RandomBytesGeneratorTest.php @@ -13,12 +13,6 @@ */ class RandomBytesGeneratorTest extends TestCase { - protected function setUp() - { - $this->skipIfHhvm(); - parent::setUp(); - } - public function lengthAndHexDataProvider() { return [ diff --git a/tests/Provider/Node/RandomNodeProviderTest.php b/tests/Provider/Node/RandomNodeProviderTest.php index d6381c15..57bd84da 100644 --- a/tests/Provider/Node/RandomNodeProviderTest.php +++ b/tests/Provider/Node/RandomNodeProviderTest.php @@ -8,12 +8,6 @@ class RandomNodeProviderTest extends TestCase { - protected function setUp() - { - $this->skipIfHhvm(); - parent::setUp(); - } - protected function tearDown() { parent::tearDown(); diff --git a/tests/Provider/Node/SystemNodeProviderTest.php b/tests/Provider/Node/SystemNodeProviderTest.php index b03c01a0..47d793ad 100644 --- a/tests/Provider/Node/SystemNodeProviderTest.php +++ b/tests/Provider/Node/SystemNodeProviderTest.php @@ -134,8 +134,6 @@ public function osCommandDataProvider() */ public function testGetNodeGetsNetworkInterfaceConfig($os, $command, $filename) { - $this->skipIfHhvm(); - $commandOutput = file_get_contents(dirname(__FILE__) . '/' . $filename); AspectMock::func('Ramsey\Uuid\Provider\Node', 'php_uname', $os); diff --git a/tests/Provider/Time/SystemTimeProviderTest.php b/tests/Provider/Time/SystemTimeProviderTest.php index af03bad7..ef3ff765 100644 --- a/tests/Provider/Time/SystemTimeProviderTest.php +++ b/tests/Provider/Time/SystemTimeProviderTest.php @@ -23,7 +23,6 @@ public function testCurrentTimeReturnsTimestampArray() */ public function testCurrentTimeUsesGettimeofday() { - $this->skipIfHhvm(); $timestamp = ['sec' => 1458844556, 'usec' => 200997]; $func = AspectMock::func('Ramsey\Uuid\Provider\Time', 'gettimeofday', $timestamp); $provider = new SystemTimeProvider(); diff --git a/tests/TestCase.php b/tests/TestCase.php index 4ea1128a..e96b537a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -10,9 +10,7 @@ class TestCase extends PHPUnitTestCase protected function tearDown() { parent::tearDown(); - if (!self::isHhvm()) { - AspectMock::clean(); - } + AspectMock::clean(); Mockery::close(); } @@ -75,16 +73,4 @@ public static function isLittleEndianSystem() { return current(unpack('v', pack('S', 0x00FF))) === 0x00FF; } - - protected function skipIfHhvm() - { - if (self::isHhvm()) { - $this->markTestSkipped('Skipping test that cannot run on HHVM'); - } - } - - protected static function isHhvm() - { - return defined('HHVM_VERSION'); - } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index c1a2760a..751acd73 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -27,10 +27,8 @@ function uuid_parse() define('UUID_TYPE_RANDOM', 4); } -if (!defined('HHVM_VERSION')) { - $kernel = \AspectMock\Kernel::getInstance(); - $kernel->init([ - 'debug' => true, - 'includePaths' => [__DIR__ . '/../src'] - ]); -} +$kernel = \AspectMock\Kernel::getInstance(); +$kernel->init([ + 'debug' => true, + 'includePaths' => [__DIR__ . '/../src'] +]); diff --git a/tools/hhvm-docker/Dockerfile b/tools/hhvm-docker/Dockerfile deleted file mode 100644 index f503e925..00000000 --- a/tools/hhvm-docker/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM benramsey/hhvm-dev:3.12.0 - -RUN apt-get update -y && apt-get install -y build-essential curl wget git uuid-dev libuuid1 -RUN wget https://github.com/vipsoft/hhvm-ext-uuid/archive/ba0ebae0fe.tar.gz \ - && tar zxf ba0ebae0fe.tar.gz \ - && cd hhvm-ext-uuid-ba0ebae0fe123e8545ea02110db2f0102c08d637/ \ - && hphpize \ - && cmake . \ - && make \ - && cp uuid.so /etc/hhvm/ext/uuid.so \ - && printf "hhvm.dynamic_extensions[uuid] = uuid.so\n" >> /etc/hhvm/php.ini -RUN rm ba0ebae0fe.tar.gz && rm -rf hhvm-ext-uuid-ba0ebae0fe123e8545ea02110db2f0102c08d637/ -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer