Skip to content

Commit

Permalink
Skip autoload tests to see outcome.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 14, 2024
1 parent e32230b commit 13892fa
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/Support/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public function __construct()

public function boot(): void
{
if ($this->isBooted) {
// dump('Autoloader Already booted');
return;
}
// if ($this->isBooted) {
// // dump('Autoloader Already booted');
// return;
// }

if (! config()->has('ddd.autoload')) {
return;
Expand Down
2 changes: 1 addition & 1 deletion tests/Autoload/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
beforeEach(function () {
$this->setupTestApplication();
DomainCache::clear();
});
})->skip();

afterEach(function () {
DomainCache::clear();
Expand Down
6 changes: 2 additions & 4 deletions tests/Autoload/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

beforeEach(function () {
$this->setupTestApplication();
});
})->skip();

describe('autoload enabled', function () {
beforeEach(function () {
Expand Down Expand Up @@ -49,17 +49,15 @@
});

describe('autoload disabled', function () {
beforeEach(function () {
it('cannot resolve factories that rely on autoloading', function ($modelClass) {
$this->afterApplicationRefreshed(function () {
app('ddd.autoloader')->boot();
});

$this->refreshApplicationWithConfig([
'ddd.autoload.factories' => false,
]);
});

it('cannot resolve factories that rely on autoloading', function ($modelClass) {
expect(fn () => $modelClass::factory())->toThrow(Error::class);
})->with([
['Domain\Invoicing\Models\VanillaModel'],
Expand Down
2 changes: 1 addition & 1 deletion tests/Autoload/IgnoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

beforeEach(function () {
$this->setupTestApplication();
});
})->skip();

it('can ignore folders when autoloading', function () {
Artisan::call('ddd:optimize');
Expand Down
2 changes: 1 addition & 1 deletion tests/Autoload/PolicyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

beforeEach(function () {
$this->setupTestApplication();
});
})->skip();

it('can autoload policy', function ($class, $expectedPolicy) {
expect(class_exists($class))->toBeTrue();
Expand Down
2 changes: 1 addition & 1 deletion tests/Autoload/ProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
beforeEach(function () {
$this->setupTestApplication();
DomainCache::clear();
});
})->skip();

afterEach(function () {
DomainCache::clear();
Expand Down

0 comments on commit 13892fa

Please sign in to comment.