mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Drop remnants of HHVM from tests
It was removed from Travis in c479cdd42f
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -13,12 +13,6 @@ use AspectMock\Test as AspectMock;
|
||||
*/
|
||||
class OpenSslGeneratorTest extends TestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
$this->skipIfHhvm();
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function lengthAndHexDataProvider()
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -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
@@ -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
@@ -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']
|
||||
]);
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user