File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 7878});
7979
8080describe ('BoostManager registration ' , function (): void {
81+ beforeEach (function (): void {
82+ Config::set ('boost.enabled ' , true );
83+ app ()->detectEnvironment (fn (): string => 'local ' );
84+ $ provider = new BoostServiceProvider (app ());
85+ $ provider ->register ();
86+ $ provider ->boot (app ('router ' ));
87+ });
88+
8189 it ('registers BoostManager in the container ' , function (): void {
8290 expect (app ()->bound (BoostManager::class))->toBeTrue ()
8391 ->and (app (BoostManager::class))->toBeInstanceOf (BoostManager::class);
8492 });
8593
8694 it ('registers BoostManager as a singleton ' , function (): void {
95+ Config::set ('boost.enabled ' , true );
8796 $ instance1 = app (BoostManager::class);
8897 $ instance2 = app (BoostManager::class);
8998
9099 expect ($ instance1 )->toBe ($ instance2 );
91100 });
92101
93102 it ('binds Boost facade to the same BoostManager instance ' , function (): void {
103+ Config::set ('boost.enabled ' , true );
94104 $ containerInstance = app (BoostManager::class);
95105 $ facadeInstance = Boost::getFacadeRoot ();
96106
You can’t perform that action at this time.
0 commit comments