Return Hexadecimal type from TimeConverterInterface::calculateTime()

This commit is contained in:
Ben Ramsey
2020-01-21 23:28:10 -06:00
parent 4963f2320a
commit 80a7be00b3
11 changed files with 51 additions and 111 deletions
+2 -5
View File
@@ -13,6 +13,7 @@ use Ramsey\Uuid\DegradedUuid;
use Ramsey\Uuid\Generator\CombGenerator;
use Ramsey\Uuid\Generator\DefaultTimeGenerator;
use Ramsey\Uuid\Math\BrickMathCalculator;
use Ramsey\Uuid\Type\Hexadecimal;
use Ramsey\Uuid\Type\Time;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidFactory;
@@ -532,11 +533,7 @@ class ExpectedBehaviorTest extends TestCase
$timeConverter
->shouldReceive('calculateTime')
->andReturnUsing(function ($seconds, $microSeconds) {
return [
'low' => dechex($seconds),
'mid' => dechex($microSeconds),
'hi' => 'abcd',
];
return new Hexadecimal('abcd' . dechex($microSeconds) . dechex($seconds));
});
$timeProvider = \Mockery::mock('Ramsey\Uuid\Provider\TimeProviderInterface', [