generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from savannabits/0.x-dev
Aligned Tests and improved installation process
- Loading branch information
Showing
12 changed files
with
135 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,6 @@ phpstan.neon | |
testbench.yaml | ||
vendor | ||
node_modules | ||
skeleton | ||
workbench | ||
modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use function Pest\Laravel\artisan; | ||
|
||
beforeEach(function () { | ||
$this->moduleTitle = 'Access Control'; | ||
$this->moduleName = 'access-control'; | ||
$this->moduleStudlyName = 'AccessControl'; | ||
}); | ||
test('can generate a new module', function () { | ||
// Run modular:make-module, expect a new module to be created | ||
artisan('modular:make', ['name' => $this->moduleTitle]) | ||
->expectsQuestion('Module already exists. Do you want to override it?', true) | ||
->expectsQuestion('Do you want to activate the new module now?', false); | ||
}); | ||
|
||
// can activate module | ||
test('can activate a module whose directory exists in modules', function () { | ||
artisan('modular:activate', ['name' => $this->moduleTitle]) | ||
->expectsOutput('Activating module: '.$this->moduleName) | ||
->expectsOutput('./composer.json has been updated') | ||
->expectsOutput('Running composer update modular/'.$this->moduleName) | ||
->doesntExpectOutputToContain('Your requirements could not be resolved to an installable set of packages') | ||
->expectsOutputToContain('Generating optimized autoload files') | ||
->assertSuccessful(); | ||
}); | ||
|
||
test('should not override existing module unless the user confirms', function () { | ||
artisan('modular:make', ['name' => $this->moduleTitle]) | ||
->expectsQuestion('Module already exists. Do you want to override it?', false) | ||
->expectsOutput('Failed to create module directories'); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.