Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Fix/issue 143 instatiate ignition #144

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"require-dev": {
"orchestra/testbench": "^3.6|^3.7|^3.8",
"phpunit/phpunit": "^7.0|^8.0",
"predis/predis": "^1.1"
"predis/predis": "^1.1",
"facade/ignition": "^1.4"
},
"license": "MIT",
"authors": [
Expand Down
20 changes: 9 additions & 11 deletions src/ACLServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,15 @@ public function loadTranslations()
*/
public function registerSolutionProviders(): void
{
if (! $this->app->runningUnitTests()) {
$this->app->make(SolutionProviderRepository::class)->registerSolutionProviders([
\Junges\ACL\Exceptions\Solutions\Providers\MissingUsersTraitSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\MissingGroupsTraitSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\MissingPermissionsTraitSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\MissingACLWildcardsTraitSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\NotInstalledSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\GroupDoesNotExistSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\PermissionDoesNotExistSolutionProvider::class,
]);
}
$this->app->make(SolutionProviderRepository::class)->registerSolutionProviders([
\Junges\ACL\Exceptions\Solutions\Providers\MissingUsersTraitSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\MissingGroupsTraitSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\MissingPermissionsTraitSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\MissingACLWildcardsTraitSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\NotInstalledSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\GroupDoesNotExistSolutionProvider::class,
\Junges\ACL\Exceptions\Solutions\Providers\PermissionDoesNotExistSolutionProvider::class,
]);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Junges\ACL\ACLServiceProvider;
use Junges\ACL\ACLAuthServiceProvider;
use Illuminate\Database\Schema\Blueprint;
use Facade\Ignition\IgnitionServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;

class TestCase extends Orchestra
Expand Down Expand Up @@ -93,6 +94,7 @@ public function getPackageProviders($app)
return [
ACLServiceProvider::class,
ACLAuthServiceProvider::class,
IgnitionServiceProvider::class,
];
}

Expand Down