Use the codec to encode to binary when using Uuid::getBytes()

This commit is contained in:
Ben Ramsey
2020-01-08 20:10:37 -06:00
parent 4d1db4d090
commit 668b6ab9a2
5 changed files with 17 additions and 2 deletions
+2
View File
@@ -73,6 +73,8 @@ class StringCodecTest extends TestCase
public function testEncodeBinaryReturnsBinaryString(): void
{
$expected = hex2bin('123456781234abcdabef1234abcd4321');
$this->uuid->method('getHex')
->willReturn('123456781234abcdabef1234abcd4321');
$this->uuid->method('getBytes')
->willReturn(hex2bin('123456781234abcdabef1234abcd4321'));
$codec = new StringCodec($this->builder);