generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
56 additions
and
4 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
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
32 changes: 32 additions & 0 deletions
32
tests/PackageServiceProviderTests/InstallCommandTests/AskToRunMigrationsTest.php
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 | ||
|
||
namespace Spatie\LaravelPackageTools\Tests\PackageServiceProviderTests\InstallCommandTests; | ||
|
||
use Spatie\LaravelPackageTools\Commands\InstallCommand; | ||
use Spatie\LaravelPackageTools\Package; | ||
use Spatie\LaravelPackageTools\Tests\PackageServiceProviderTests\PackageServiceProviderTestCase; | ||
use Spatie\TestTime\TestTime; | ||
|
||
class AskToRunMigrationsTest extends PackageServiceProviderTestCase | ||
{ | ||
public function configurePackage(Package $package) | ||
{ | ||
TestTime::freeze('Y-m-d H:i:s', '2020-01-01 00:00:00'); | ||
|
||
$package | ||
->name('laravel-package-tools') | ||
->hasConfigFile() | ||
->hasInstallCommand(function (InstallCommand $command) { | ||
$command->askToRunMigrations(); | ||
}); | ||
} | ||
|
||
/** @test */ | ||
public function it_can_ask_to_run_the_migrations() | ||
{ | ||
$this | ||
->artisan('package-tools:install') | ||
->assertSuccessful() | ||
->expectsConfirmation('Would you like to run the migrations now?'); | ||
} | ||
} |
File renamed without changes.