mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +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
@@ -3,17 +3,18 @@
|
||||
namespace Ramsey\Uuid\Test\Provider\Node;
|
||||
|
||||
use Ramsey\Uuid\Provider\Node\FallbackNodeProvider;
|
||||
use Ramsey\Uuid\Provider\NodeProviderInterface;
|
||||
use Ramsey\Uuid\Test\TestCase;
|
||||
|
||||
class FallbackNodeProviderTest extends TestCase
|
||||
{
|
||||
public function testGetNodeCallsGetNodeOnEachProviderUntilNodeFound()
|
||||
{
|
||||
$providerWithNode = $this->getMockBuilder('Ramsey\Uuid\Provider\NodeProviderInterface')->getMock();
|
||||
$providerWithNode = $this->getMockBuilder(NodeProviderInterface::class)->getMock();
|
||||
$providerWithNode->expects($this->once())
|
||||
->method('getNode')
|
||||
->willReturn('57764a07f756');
|
||||
$providerWithoutNode = $this->getMockBuilder('Ramsey\Uuid\Provider\NodeProviderInterface')->getMock();
|
||||
$providerWithoutNode = $this->getMockBuilder(NodeProviderInterface::class)->getMock();
|
||||
$providerWithoutNode->expects($this->once())
|
||||
->method('getNode')
|
||||
->willReturn(null);
|
||||
@@ -24,15 +25,15 @@ class FallbackNodeProviderTest extends TestCase
|
||||
|
||||
public function testGetNodeReturnsNodeFromFirstProviderWithNode()
|
||||
{
|
||||
$providerWithoutNode = $this->getMockBuilder('Ramsey\Uuid\Provider\NodeProviderInterface')->getMock();
|
||||
$providerWithoutNode = $this->getMockBuilder(NodeProviderInterface::class)->getMock();
|
||||
$providerWithoutNode->expects($this->once())
|
||||
->method('getNode')
|
||||
->willReturn(null);
|
||||
$providerWithNode = $this->getMockBuilder('Ramsey\Uuid\Provider\NodeProviderInterface')->getMock();
|
||||
$providerWithNode = $this->getMockBuilder(NodeProviderInterface::class)->getMock();
|
||||
$providerWithNode->expects($this->once())
|
||||
->method('getNode')
|
||||
->willReturn('57764a07f756');
|
||||
$anotherProviderWithoutNode = $this->getMockBuilder('Ramsey\Uuid\Provider\NodeProviderInterface')->getMock();
|
||||
$anotherProviderWithoutNode = $this->getMockBuilder(NodeProviderInterface::class)->getMock();
|
||||
$anotherProviderWithoutNode->expects($this->never())
|
||||
->method('getNode');
|
||||
|
||||
@@ -43,7 +44,7 @@ class FallbackNodeProviderTest extends TestCase
|
||||
|
||||
public function testGetNodeReturnsNullWhenNoNodesFound()
|
||||
{
|
||||
$providerWithoutNode = $this->getMockBuilder('Ramsey\Uuid\Provider\NodeProviderInterface')->getMock();
|
||||
$providerWithoutNode = $this->getMockBuilder(NodeProviderInterface::class)->getMock();
|
||||
$providerWithoutNode->method('getNode')
|
||||
->willReturn(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user