File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55use A17 \Twill \Commands \Traits \HandlesPresets ;
66use A17 \Twill \Models \User ;
77use A17 \Twill \RouteServiceProvider ;
8+ use A17 \Twill \Services \Blocks \Block ;
89use A17 \Twill \Tests \Integration \Behaviors \CopyBlocks ;
10+ use A17 \Twill \Facades \TwillBlocks ;
911use A17 \Twill \TwillServiceProvider ;
1012use A17 \Twill \ValidationServiceProvider ;
1113use Carbon \Carbon ;
@@ -136,6 +138,7 @@ public function setUp(): void
136138 $ this ->instantiateFaker ();
137139
138140 $ this ->copyBlocks ();
141+ $ this ->registerCopiedBlocks ();
139142
140143 $ this ->installTwill ();
141144
@@ -558,6 +561,21 @@ public function loadConfig()
558561 {
559562 }
560563
564+ protected function registerCopiedBlocks (): void
565+ {
566+ if (Block::getForComponent ('a17-block-quote ' )) {
567+ return ;
568+ }
569+
570+ foreach (config ('twill.block_editor.directories.source.blocks ' ) as $ path ) {
571+ TwillBlocks::registerPackageBlocksDirectory ($ this ->normalizeDir ($ path ['path ' ]));
572+ }
573+
574+ foreach (config ('twill.block_editor.directories.source.repeaters ' ) as $ path ) {
575+ TwillBlocks::registerPackageRepeatersDirectory ($ this ->normalizeDir ($ path ['path ' ]));
576+ }
577+ }
578+
561579 protected static function getBasePathStatic (): string
562580 {
563581 $ basePath = __DIR__ . '/../../vendor/orchestra/testbench-core/laravel ' ;
You can’t perform that action at this time.
0 commit comments