|
5 | 5 | use Tdwesten\StatamicBuilder\FieldTypes\Text; |
6 | 6 | use Tests\Helpers\TestBlueprint; |
7 | 7 |
|
8 | | -test('Has a title', function () { |
| 8 | +test('Has a title', function (): void { |
9 | 9 | $blueprint = TestBlueprint::make('test_blueprint'); |
10 | 10 |
|
11 | 11 | expect($blueprint->toArray()['title'])->toBe( |
12 | 12 | 'Test Blueprint' |
13 | 13 | ); |
14 | 14 | }); |
15 | 15 |
|
16 | | -it('can be set to hidden', function () { |
| 16 | +it('can be set to hidden', function (): void { |
17 | 17 | $blueprint = TestBlueprint::make('test_blueprint'); |
18 | 18 | $blueprint->hidden(true); |
19 | 19 |
|
20 | 20 | expect($blueprint->toArray()['hide'])->toBe(true); |
21 | 21 | }); |
22 | 22 |
|
23 | | -test('Tabs are renderd', function () { |
| 23 | +test('Tabs are renderd', function (): void { |
24 | 24 | $blueprint = TestBlueprint::make('test_blueprint'); |
25 | 25 |
|
26 | 26 | $expected = [ |
|
58 | 58 | expect($blueprint->toArray())->toBe($expected); |
59 | 59 | }); |
60 | 60 |
|
61 | | -it('throws an exception when adding a field to a tab', function () { |
| 61 | +it('throws an exception when adding a field to a tab', function (): void { |
62 | 62 | $blueprint = TestBlueprint::make('test_blueprint'); |
63 | 63 | $blueprint |
64 | 64 | ->title('School') |
|
69 | 69 | $blueprint->toArray(); |
70 | 70 | })->throws(BlueprintRenderException::class, 'Only sections are allowed in tabs'); |
71 | 71 |
|
72 | | -test('you can set a title', function () { |
| 72 | +test('you can set a title', function (): void { |
73 | 73 | $blueprint = TestBlueprint::make('test_blueprint'); |
74 | 74 | $blueprint->title('School'); |
75 | 75 |
|
76 | 76 | expect($blueprint->toArray()['title'])->toBe('School'); |
77 | 77 | }); |
78 | 78 |
|
79 | | -test('you can get the handle', function () { |
| 79 | +test('you can get the handle', function (): void { |
80 | 80 | $blueprint = TestBlueprint::make('test_blueprint'); |
81 | 81 |
|
82 | 82 | expect($blueprint->getHandle())->toBe('test_blueprint'); |
|
0 commit comments