Prepare tests for running on PHP 8

This commit is contained in:
Ben Ramsey
2021-09-23 13:58:48 -05:00
parent e2ec78e3d9
commit c9ed6dd82f
25 changed files with 189 additions and 169 deletions
+6 -8
View File
@@ -27,10 +27,9 @@ class DefaultTimeGeneratorTest extends TestCase
/** @var int */
private $clockSeq = 4066;
protected function setUp()
protected function set_up()
{
parent::setUp();
parent::set_up();
$this->timeProvider = $this->getMockBuilder('Ramsey\Uuid\Provider\TimeProviderInterface')->getMock();
$this->nodeProvider = $this->getMockBuilder('Ramsey\Uuid\Provider\NodeProviderInterface')->getMock();
$this->timeConverter = $this->getMockBuilder('Ramsey\Uuid\Converter\TimeConverterInterface')->getMock();
@@ -38,14 +37,12 @@ class DefaultTimeGeneratorTest extends TestCase
$this->calculatedTime = ["low" => "83cb98e0", "mid" => "98e0", "hi" => "03cb"];
}
protected function tearDown()
protected function tear_down()
{
parent::tearDown();
parent::tear_down();
$this->timeProvider = null;
$this->nodeProvider = null;
$this->timeConverter = null;
Mockery::close();
AspectMock::clean();
}
public function testGenerateUsesNodeProviderWhenNodeIsNull()
@@ -125,7 +122,7 @@ class DefaultTimeGeneratorTest extends TestCase
$this->timeConverter,
$this->timeProvider
);
$defaultTimeGenerator->generate($this->nodeId, $this->clockSeq);
$this->assertIsString($defaultTimeGenerator->generate($this->nodeId, $this->clockSeq));
}
/**
@@ -170,6 +167,7 @@ class DefaultTimeGeneratorTest extends TestCase
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
* @requires PHP < 8
*/
public function testGenerateUsesRandomSequenceWhenClockSeqNull()
{