Set minimum version to PHP 5.6 and use PHP 5.5 style ::class constants

This commit is contained in:
Jildert Miedema
2016-06-23 20:23:07 +02:00
committed by Ben Ramsey
parent e535e89708
commit 225eb3b4c1
14 changed files with 75 additions and 54 deletions
+4 -4
View File
@@ -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);
}