Skip to content

Commit 8566c27

Browse files
lam0819github-actions[bot]
authored andcommitted
Fix styling
1 parent f72e976 commit 8566c27

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

packages/inspirecms-visual-editor/tests/Unit/Blocks/BlockTypesTest.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
use SolutionForest\InspireCmsVisualEditor\Blocks\Contracts\BlockInterface;
44
use SolutionForest\InspireCmsVisualEditor\Blocks\Contracts\ContainerBlockInterface;
5+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ButtonBlock;
6+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ColumnBlock;
57
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ContainerBlock;
6-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\SectionBlock;
8+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\DividerBlock;
79
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\GridBlock;
8-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ColumnBlock;
910
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\HeadingBlock;
10-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\TextBlock;
11-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ButtonBlock;
1211
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ImageBlock;
12+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\SectionBlock;
1313
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\SpacerBlock;
14-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\DividerBlock;
14+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\TextBlock;
1515
use SolutionForest\InspireCmsVisualEditor\Enums\BlockCategory;
1616

1717
describe('Layout Blocks', function () {
1818
describe('ContainerBlock', function () {
19-
beforeEach(fn () => $this->block = new ContainerBlock());
19+
beforeEach(fn () => $this->block = new ContainerBlock);
2020

2121
it('implements BlockInterface', function () {
2222
expect($this->block)->toBeInstanceOf(BlockInterface::class);
@@ -58,7 +58,7 @@
5858
});
5959

6060
describe('SectionBlock', function () {
61-
beforeEach(fn () => $this->block = new SectionBlock());
61+
beforeEach(fn () => $this->block = new SectionBlock);
6262

6363
it('has correct type', function () {
6464
expect($this->block->getType())->toBe('section');
@@ -74,7 +74,7 @@
7474
});
7575

7676
describe('GridBlock', function () {
77-
beforeEach(fn () => $this->block = new GridBlock());
77+
beforeEach(fn () => $this->block = new GridBlock);
7878

7979
it('has correct type', function () {
8080
expect($this->block->getType())->toBe('grid');
@@ -95,7 +95,7 @@
9595
});
9696

9797
describe('ColumnBlock', function () {
98-
beforeEach(fn () => $this->block = new ColumnBlock());
98+
beforeEach(fn () => $this->block = new ColumnBlock);
9999

100100
it('has correct type', function () {
101101
expect($this->block->getType())->toBe('column');
@@ -113,7 +113,7 @@
113113

114114
describe('Basic Blocks', function () {
115115
describe('HeadingBlock', function () {
116-
beforeEach(fn () => $this->block = new HeadingBlock());
116+
beforeEach(fn () => $this->block = new HeadingBlock);
117117

118118
it('implements BlockInterface', function () {
119119
expect($this->block)->toBeInstanceOf(BlockInterface::class);
@@ -146,7 +146,7 @@
146146
});
147147

148148
describe('TextBlock', function () {
149-
beforeEach(fn () => $this->block = new TextBlock());
149+
beforeEach(fn () => $this->block = new TextBlock);
150150

151151
it('has correct type', function () {
152152
expect($this->block->getType())->toBe('text');
@@ -169,7 +169,7 @@
169169
});
170170

171171
describe('ButtonBlock', function () {
172-
beforeEach(fn () => $this->block = new ButtonBlock());
172+
beforeEach(fn () => $this->block = new ButtonBlock);
173173

174174
it('has correct type', function () {
175175
expect($this->block->getType())->toBe('button');
@@ -198,7 +198,7 @@
198198
});
199199

200200
describe('ImageBlock', function () {
201-
beforeEach(fn () => $this->block = new ImageBlock());
201+
beforeEach(fn () => $this->block = new ImageBlock);
202202

203203
it('has correct type', function () {
204204
expect($this->block->getType())->toBe('image');
@@ -224,7 +224,7 @@
224224

225225
describe('Utility Blocks', function () {
226226
describe('SpacerBlock', function () {
227-
beforeEach(fn () => $this->block = new SpacerBlock());
227+
beforeEach(fn () => $this->block = new SpacerBlock);
228228

229229
it('has correct type', function () {
230230
expect($this->block->getType())->toBe('spacer');
@@ -247,7 +247,7 @@
247247
});
248248

249249
describe('DividerBlock', function () {
250-
beforeEach(fn () => $this->block = new DividerBlock());
250+
beforeEach(fn () => $this->block = new DividerBlock);
251251

252252
it('has correct type', function () {
253253
expect($this->block->getType())->toBe('divider');
@@ -265,15 +265,15 @@
265265

266266
describe('Block prop validation', function () {
267267
it('validates required props', function () {
268-
$block = new HeadingBlock();
268+
$block = new HeadingBlock;
269269
$errors = $block->validateProps([]);
270270

271271
// Content should be required
272272
expect($errors)->toBeArray();
273273
});
274274

275275
it('passes validation with valid props', function () {
276-
$block = new HeadingBlock();
276+
$block = new HeadingBlock;
277277
$errors = $block->validateProps([
278278
'content' => 'Valid Heading',
279279
'level' => 2,

packages/inspirecms-visual-editor/tests/Unit/Rendering/BlockRendererTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
use Illuminate\Support\HtmlString;
44
use SolutionForest\InspireCmsVisualEditor\Blocks\Registry\BlockRegistry;
5+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ButtonBlock;
6+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ColumnBlock;
57
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ContainerBlock;
8+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\DividerBlock;
69
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\GridBlock;
7-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ColumnBlock;
810
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\HeadingBlock;
9-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\TextBlock;
10-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ButtonBlock;
1111
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\ImageBlock;
1212
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\SectionBlock;
1313
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\SpacerBlock;
14-
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\DividerBlock;
14+
use SolutionForest\InspireCmsVisualEditor\Blocks\Types\TextBlock;
1515
use SolutionForest\InspireCmsVisualEditor\Rendering\BlockRenderer;
1616

1717
beforeEach(function () {
@@ -29,7 +29,7 @@
2929
DividerBlock::class,
3030
]);
3131

32-
$this->renderer = new BlockRenderer();
32+
$this->renderer = new BlockRenderer;
3333
});
3434

3535
describe('BlockRenderer', function () {

0 commit comments

Comments
 (0)