Skip to content

Commit 158d1f7

Browse files
committed
Add testing helper to make a publication type
1 parent d90dcc9 commit 158d1f7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/framework/tests/Unit/PublicationFieldTypeValidationRulesTest.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44

55
namespace Hyde\Framework\Testing\Unit;
66

7+
use Hyde\Framework\Features\Publications\Models\PublicationType;
78
use Hyde\Testing\TestCase;
89

910
/**
1011
* @covers \Hyde\Framework\Features\Publications\Models\PublicationFieldType
1112
*/
1213
class PublicationFieldTypeValidationRulesTest extends TestCase
1314
{
14-
//
15+
protected function makePublicationType(array $fields = []): PublicationType
16+
{
17+
return new PublicationType(
18+
'test',
19+
'__createdAt',
20+
fields: $fields,
21+
directory: 'test-publication',
22+
);
23+
}
1524
}

0 commit comments

Comments
 (0)