diff --git a/tests/Autoload/CommandTest.php b/tests/Autoload/CommandTest.php index a8962fd..1138c12 100644 --- a/tests/Autoload/CommandTest.php +++ b/tests/Autoload/CommandTest.php @@ -31,7 +31,7 @@ $mock = AutoloadManager::partialMock(); $mock->shouldNotReceive('handleCommands'); - $mock->boot(); + $mock->run(); expect($mock->getRegisteredCommands())->toBeEmpty(); }); @@ -42,7 +42,7 @@ config()->set('ddd.autoload.commands', true); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect(array_values($mock->getRegisteredCommands()))->toEqualCanonicalizing(array_values($this->commands)); }); @@ -55,7 +55,7 @@ config()->set('ddd.autoload.commands', true); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect(array_values($mock->getRegisteredCommands()))->toEqualCanonicalizing([]); }); @@ -65,7 +65,7 @@ DomainCache::clear(); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect(array_values($mock->getRegisteredCommands()))->toEqualCanonicalizing(array_values($this->commands)); }); diff --git a/tests/Autoload/FactoryTest.php b/tests/Autoload/FactoryTest.php index dc8e822..3b49942 100644 --- a/tests/Autoload/FactoryTest.php +++ b/tests/Autoload/FactoryTest.php @@ -25,14 +25,14 @@ $mock = AutoloadManager::partialMock(); $mock->shouldReceive('handleFactories')->once(); - $mock->boot(); + $mock->run(); }); it('can resolve domain factory', function ($modelClass, $expectedFactoryClass) { config()->set('ddd.autoload.factories', true); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect($modelClass::factory())->toBeInstanceOf($expectedFactoryClass); })->with([ @@ -71,14 +71,14 @@ $mock = AutoloadManager::partialMock(); $mock->shouldNotReceive('handleFactories'); - $mock->boot(); + $mock->run(); }); it('cannot resolve factories that rely on autoloading', function ($modelClass, $correctFactories) { config()->set('ddd.autoload.factories', false); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect(fn () => $modelClass::factory())->toThrow(Error::class); })->with([ diff --git a/tests/Autoload/PolicyTest.php b/tests/Autoload/PolicyTest.php index 3b11b25..5c1859c 100644 --- a/tests/Autoload/PolicyTest.php +++ b/tests/Autoload/PolicyTest.php @@ -32,7 +32,7 @@ $mock = AutoloadManager::partialMock(); $mock->shouldNotReceive('handlePolicies'); - $mock->boot(); + $mock->run(); }); }); @@ -42,14 +42,14 @@ $mock = AutoloadManager::partialMock(); $mock->shouldReceive('handlePolicies')->once(); - $mock->boot(); + $mock->run(); }); it('can resolve the policies', function () { config()->set('ddd.autoload.policies', true); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); foreach ($this->policies as $class => $expectedPolicy) { $resolvedPolicy = Gate::getPolicyFor($class); @@ -61,7 +61,7 @@ config()->set('ddd.autoload.policies', true); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect(class_exists($class))->toBeTrue(); expect(Gate::getPolicyFor($class))->toBeInstanceOf($expectedPolicy); diff --git a/tests/Autoload/ProviderTest.php b/tests/Autoload/ProviderTest.php index 4da3952..da2864f 100644 --- a/tests/Autoload/ProviderTest.php +++ b/tests/Autoload/ProviderTest.php @@ -31,14 +31,14 @@ $mock = AutoloadManager::partialMock(); $mock->shouldNotReceive('handleProviders'); - $mock->boot(); + $mock->run(); }); it('does not register the providers', function () { config()->set('ddd.autoload.providers', false); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect($mock->getRegisteredProviders())->toBeEmpty(); }); @@ -50,14 +50,14 @@ $mock = AutoloadManager::partialMock(); $mock->shouldReceive('handleProviders')->once(); - $mock->boot(); + $mock->run(); }); it('registers the providers', function () { config()->set('ddd.autoload.providers', true); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect(array_values($mock->getRegisteredProviders()))->toEqualCanonicalizing($this->providers); }); @@ -70,7 +70,7 @@ config()->set('ddd.autoload.providers', true); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect(array_values($mock->getRegisteredProviders()))->toEqualCanonicalizing([]); }); @@ -82,7 +82,7 @@ config()->set('ddd.autoload.providers', true); $mock = AutoloadManager::partialMock(); - $mock->boot(); + $mock->run(); expect(array_values($mock->getRegisteredProviders()))->toEqualCanonicalizing($this->providers); });