Skip to content

Commit

Permalink
Assert config values
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 17, 2024
1 parent 2f6a3b5 commit f30bd3d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/Autoload/IgnoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
});

it('can ignore folders when autoloading', function () {
expect(config('ddd.domain_path'))->toEqual('src/Domain');
expect(config('ddd.domain_namespace'))->toEqual('Domain');
expect(config('ddd.application_path'))->toEqual('src/Application');
expect(config('ddd.application_namespace'))->toEqual('Application');
expect(config('ddd.layers'))->toContain('src/Infrastructure');

$expected = [
...array_values($this->providers),
...array_values($this->commands),
Expand All @@ -53,7 +59,8 @@
...DDD::autoloader()->discoverCommands(),
];

expect($discovered)->toEqualCanonicalizing($expected);
expect($expected)->each(fn ($item) => $item->toBeIn($discovered));
expect($discovered)->toHaveCount(count($expected));

Config::set('ddd.autoload_ignore', ['Commands']);

Expand Down

0 comments on commit f30bd3d

Please sign in to comment.