Drop remnants of HHVM from tests

It was removed from Travis in c479cdd42f
This commit is contained in:
Martin Hujer
2017-11-10 09:41:09 +01:00
committed by Ben Ramsey
parent 1b608e7e01
commit f3e0fed2d7
10 changed files with 7 additions and 66 deletions
+1 -4
View File
@@ -45,9 +45,7 @@ class DefaultTimeGeneratorTest extends TestCase
$this->nodeProvider = null;
$this->timeConverter = null;
Mockery::close();
if (!self::isHhvm()) {
AspectMock::clean();
}
AspectMock::clean();
}
public function testGenerateUsesNodeProviderWhenNodeIsNull()
@@ -165,7 +163,6 @@ class DefaultTimeGeneratorTest extends TestCase
*/
public function testGenerateUsesRandomSequenceWhenClockSeqNull()
{
$this->skipIfHhvm();
$mt_rand = AspectMock::func('Ramsey\Uuid\Generator', 'random_int', 9622);
$defaultTimeGenerator = new DefaultTimeGenerator(
$this->nodeProvider,
-6
View File
@@ -13,12 +13,6 @@ use AspectMock\Test as AspectMock;
*/
class OpenSslGeneratorTest extends TestCase
{
protected function setUp()
{
$this->skipIfHhvm();
parent::setUp();
}
public function lengthAndHexDataProvider()
{
return [
-6
View File
@@ -15,10 +15,4 @@ class PeclUuidTestCase extends TestCase
{
protected $uuidString = 'b08c6fff-7dc5-e111-9b21-0800200c9a66';
protected $uuidBinary = '62303863366666662d376463352d653131312d396232312d303830303230306339613636';
protected function setUp()
{
$this->skipIfHhvm();
parent::setUp();
}
}
@@ -13,12 +13,6 @@ use AspectMock\Test as AspectMock;
*/
class RandomBytesGeneratorTest extends TestCase
{
protected function setUp()
{
$this->skipIfHhvm();
parent::setUp();
}
public function lengthAndHexDataProvider()
{
return [
@@ -8,12 +8,6 @@ use AspectMock\Test as AspectMock;
class RandomNodeProviderTest extends TestCase
{
protected function setUp()
{
$this->skipIfHhvm();
parent::setUp();
}
protected function tearDown()
{
parent::tearDown();
@@ -268,8 +268,6 @@ class SystemNodeProviderTest extends TestCase
*/
public function testGetNodeGetsNetworkInterfaceConfig($os, $command)
{
$this->skipIfHhvm();
/*/ Arrange /*/
$this->arrangeMockFunctions(
'whatever',
@@ -23,7 +23,6 @@ class SystemTimeProviderTest extends TestCase
*/
public function testCurrentTimeUsesGettimeofday()
{
$this->skipIfHhvm();
$timestamp = ['sec' => 1458844556, 'usec' => 200997];
$func = AspectMock::func('Ramsey\Uuid\Provider\Time', 'gettimeofday', $timestamp);
$provider = new SystemTimeProvider();
+1 -15
View File
@@ -10,9 +10,7 @@ class TestCase extends PhpUnitTestCase
protected function tearDown()
{
parent::tearDown();
if (!self::isHhvm()) {
AspectMock::clean();
}
AspectMock::clean();
Mockery::close();
}
@@ -61,16 +59,4 @@ class TestCase extends PhpUnitTestCase
{
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');
}
}
+5 -7
View File
@@ -1,10 +1,8 @@
<?php
include __DIR__ . '/../vendor/autoload.php'; // composer autoload
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']
]);
-13
View File
@@ -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