Skip to content

Commit

Permalink
Attempt fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 14, 2024
1 parent f38f960 commit b700cf0
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions tests/Autoload/ProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,13 @@
uses(BootsTestApplication::class);

beforeEach(function () {
// $this->refreshApplicationWithConfig([
// 'ddd.domain_path' => 'src/Domain',
// 'ddd.domain_namespace' => 'Domain',
// 'ddd.application_namespace' => 'Application',
// 'ddd.application_path' => 'src/Application',
// 'ddd.application_objects' => [
// 'controller',
// 'request',
// 'middleware',
// ],
// 'ddd.layers' => [
// 'Infrastructure' => 'src/Infrastructure',
// ],
// 'ddd.autoload_ignore' => [
// 'Tests',
// 'Database/Migrations',
// ],
// 'cache.default' => 'file',
// ]);

$this->setupTestApplication();
DomainCache::clear();
});

// afterEach(function () {
// $this->setupTestApplication();
// });
afterEach(function () {
DomainCache::clear();
});

describe('without autoload', function () {
it('does not register the provider', function ($binding) {
Expand Down Expand Up @@ -86,7 +67,7 @@
});

it('registers the provider in custom layer', function () {
$this->afterApplicationCreated(function () {
$this->afterApplicationRefreshed(function () {
app('ddd.autoloader')->boot();
});

Expand All @@ -103,7 +84,7 @@
it('remembers the last cached state', function () {
DomainCache::set('domain-providers', []);

$this->afterApplicationCreated(function () {
$this->afterApplicationRefreshed(function () {
app('ddd.autoloader')->boot();
});

Expand All @@ -120,7 +101,7 @@
DomainCache::set('domain-providers', []);
DomainCache::clear();

$this->afterApplicationCreated(function () {
$this->afterApplicationRefreshed(function () {
app('ddd.autoloader')->boot();
});

Expand Down

0 comments on commit b700cf0

Please sign in to comment.