Allow setting the node provider on the FeatureSet

This commit is contained in:
Ben Ramsey
2020-02-29 23:51:00 -06:00
parent 86c37eff4c
commit 836de4ece5
2 changed files with 25 additions and 0 deletions
+10
View File
@@ -12,6 +12,7 @@ use Ramsey\Uuid\Generator\DefaultNameGenerator;
use Ramsey\Uuid\Generator\PeclUuidTimeGenerator;
use Ramsey\Uuid\Guid\GuidBuilder;
use Ramsey\Uuid\Math\BrickMathCalculator;
use Ramsey\Uuid\Provider\NodeProviderInterface;
use Ramsey\Uuid\Validator\ValidatorInterface;
class FeatureSetTest extends TestCase
@@ -67,4 +68,13 @@ class FeatureSetTest extends TestCase
$this->assertInstanceOf(BrickMathCalculator::class, $featureSet->getCalculator());
}
public function testSetNodeProvider(): void
{
$nodeProvider = Mockery::mock(NodeProviderInterface::class);
$featureSet = new FeatureSet();
$featureSet->setNodeProvider($nodeProvider);
$this->assertSame($nodeProvider, $featureSet->getNodeProvider());
}
}