@@ -20,14 +20,25 @@ abstract class TestCase extends AddonTestCase
2020
2121 protected string $ addonServiceProvider = ServiceProvider::class;
2222
23- protected $ fakeStacheDirectory = __DIR__ .'/__fixtures__/dev-null ' ;
24-
2523 protected $ shouldFakeVersion = true ;
2624
2725 protected Collection $ collection ;
2826
2927 protected Blueprint $ blueprint ;
3028
29+ protected function setUp (): void
30+ {
31+ parent ::setUp ();
32+
33+ Taxonomy::make ('categories ' )->save ();
34+ Term::make ('one ' )->taxonomy ('categories ' )->dataForLocale ('default ' , [])->save ();
35+ Term::make ('two ' )->taxonomy ('categories ' )->dataForLocale ('default ' , [])->save ();
36+
37+ $ this ->collection = CollectionFacade::make ('events ' )
38+ ->taxonomies (['categories ' ])
39+ ->save ();
40+ }
41+
3142 protected function getEnvironmentSetUp ($ app )
3243 {
3344 parent ::getEnvironmentSetUp ($ app );
@@ -40,13 +51,6 @@ protected function getEnvironmentSetUp($app)
4051 Fieldset::addNamespace ('events ' , __DIR__ .'/../resources/fieldsets ' );
4152 app ()->extend (BlueprintRepository::class, fn ($ repo ) => $ repo ->setDirectory (__DIR__ .'/__fixtures__/blueprints ' ));
4253
43- Taxonomy::make ('categories ' )->save ();
44- Term::make ('one ' )->taxonomy ('categories ' )->dataForLocale ('default ' , [])->save ();
45- Term::make ('two ' )->taxonomy ('categories ' )->dataForLocale ('default ' , [])->save ();
46-
47- $ this ->collection = CollectionFacade::make ('events ' )
48- ->taxonomies (['categories ' ])
49- ->save ();
5054 });
5155 }
5256}
0 commit comments