Skip to content

Commit

Permalink
[test] fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
alissn committed Sep 19, 2024
1 parent 704eea8 commit f5ac56b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ModuleManifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function registerFiles(): void

public function getModulesData(): Collection
{
if (! empty(self::$manifestData)) {
if (! empty(self::$manifestData) && ! app()->runningUnitTests()) {
return self::$manifestData;
}

Expand Down
2 changes: 2 additions & 0 deletions tests/LaravelModulesServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public function test_it_throws_exception_if_config_is_invalid()

$this->app['config']->set('modules.activators.file', ['class' => null]);

app()->forgetInstance(ActivatorInterface::class);

$this->assertInstanceOf(ActivatorInterface::class, app(ActivatorInterface::class));
}
}

0 comments on commit f5ac56b

Please sign in to comment.