Update dev requirements and test suite for PHP 7+ only

This commit is contained in:
Ben Ramsey
2017-11-08 16:25:08 -06:00
parent 049d5acf7a
commit 5d7ee63f1c
28 changed files with 206 additions and 191 deletions
+6 -3
View File
@@ -29,7 +29,7 @@ class DefaultTimeGeneratorTest extends TestCase
private $clockSeq = 4066;
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->timeProvider = $this->getMockBuilder(TimeProviderInterface::class)->getMock();
@@ -39,7 +39,7 @@ class DefaultTimeGeneratorTest extends TestCase
$this->calculatedTime = ["low" => "83cb98e0", "mid" => "98e0", "hi" => "03cb"];
}
protected function tearDown()
protected function tearDown(): void
{
parent::tearDown();
$this->timeProvider = null;
@@ -107,6 +107,8 @@ class DefaultTimeGeneratorTest extends TestCase
*/
public function testGenerateAppliesVersionAndVariant()
{
$expectedBytes = hex2bin('83cb98e098e003cb8fe2122f80ca9e06');
$this->timeProvider->method('currentTime')
->willReturn($this->currentTime);
$this->timeConverter->method('calculateTime')
@@ -126,7 +128,8 @@ class DefaultTimeGeneratorTest extends TestCase
$this->timeConverter,
$this->timeProvider
);
$defaultTimeGenerator->generate($this->nodeId, $this->clockSeq);
$this->assertSame($expectedBytes, $defaultTimeGenerator->generate($this->nodeId, $this->clockSeq));
}
/**