Skip to content

Commit 1b40960

Browse files
authored
Update HasBinaryUuidTest.php
1 parent 3cc7650 commit 1b40960

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/Feature/HasBinaryUuidTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ public function it_decodes_columns_besides_primary_uuid_when_turned_to_an_array(
9696
$this->assertEquals($modelArray['relation_uuid'], $model->relation_uuid_text);
9797
}
9898

99+
/** @test */
100+
public function it_should_use_custom_suffix_when_specified()
101+
{
102+
$uuid = Uuid::uuid1();
103+
104+
$model = $this->createModel($uuid);
105+
106+
$model->setUuidSuffix('_str');
107+
108+
$modelArray = $model->toArray();
109+
110+
$this->assertNotNull($model);
111+
$this->assertTrue(array_key_exists('uuid', $modelArray));
112+
$this->assertEquals($modelArray['uuid'], $model->uuid_str);
113+
}
114+
99115
/** @test */
100116
public function it_can_query_multiple_relations_with_scope()
101117
{

0 commit comments

Comments
 (0)