mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-23 17:28:59 +03:00
Set minimum version to PHP 5.6 and use PHP 5.5 style ::class constants
This commit is contained in:
committed by
Ben Ramsey
parent
e535e89708
commit
225eb3b4c1
@@ -27,8 +27,8 @@ class StringCodecTest extends TestCase
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->builder = $this->getMockBuilder('Ramsey\Uuid\Builder\UuidBuilderInterface')->getMock();
|
||||
$this->uuid = $this->getMockBuilder('Ramsey\Uuid\UuidInterface')->getMock();
|
||||
$this->builder = $this->getMockBuilder(UuidBuilderInterface::class)->getMock();
|
||||
$this->uuid = $this->getMockBuilder(UuidInterface::class)->getMock();
|
||||
$this->fields = ['time_low' => '12345678',
|
||||
'time_mid' => '1234',
|
||||
'time_hi_and_version' => 'abcd',
|
||||
@@ -87,7 +87,7 @@ class StringCodecTest extends TestCase
|
||||
$string = 'uuid:12345678-1234-abcd-abef-1234abcd4321';
|
||||
$this->builder->expects($this->once())
|
||||
->method('build')
|
||||
->with($this->isInstanceOf('Ramsey\Uuid\Codec\StringCodec'), $this->fields);
|
||||
->with($this->isInstanceOf(StringCodec::class), $this->fields);
|
||||
$codec = new StringCodec($this->builder);
|
||||
$codec->decode($string);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ class StringCodecTest extends TestCase
|
||||
public function testDecodeThrowsExceptionOnInvalidUuid()
|
||||
{
|
||||
$string = 'invalid-uuid';
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->setExpectedException(\InvalidArgumentException::class);
|
||||
$codec = new StringCodec($this->builder);
|
||||
$codec->decode($string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user