From 2a9d1b48978e048e93a195bb7cdaaa5e05c489e7 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 11 Aug 2016 12:09:28 +0100 Subject: [PATCH] Backport new command tests --- .travis.yml | 2 + tests/Functional/AppCommandTest.php | 39 +++++++++++++++++++ ...CommandTest.php => ArtisanCommandTest.php} | 4 +- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 tests/Functional/AppCommandTest.php rename tests/Functional/{CommandTest.php => ArtisanCommandTest.php} (89%) diff --git a/.travis.yml b/.travis.yml index cf51d22d5c71..957602175dd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ php: sudo: false +before_install: cp .env.example .env + install: travis_retry composer install --no-interaction --no-scripts --prefer-source script: vendor/bin/phpunit diff --git a/tests/Functional/AppCommandTest.php b/tests/Functional/AppCommandTest.php new file mode 100644 index 000000000000..9e596c224148 --- /dev/null +++ b/tests/Functional/AppCommandTest.php @@ -0,0 +1,39 @@ + + * @author James Brooks + */ +class AppCommandTest extends AbstractTestCase +{ + public function testInstall() + { + $this->assertSame(0, $this->app->make(Kernel::class)->call('app:install')); + } + + public function testReset() + { + $this->assertSame(0, $this->app->make(Kernel::class)->call('app:reset')); + } + + public function testUpdate() + { + $this->assertSame(0, $this->app->make(Kernel::class)->call('app:reset')); + } +} diff --git a/tests/Functional/CommandTest.php b/tests/Functional/ArtisanCommandTest.php similarity index 89% rename from tests/Functional/CommandTest.php rename to tests/Functional/ArtisanCommandTest.php index 43f4b1a3c810..e8c7bf3e0866 100644 --- a/tests/Functional/CommandTest.php +++ b/tests/Functional/ArtisanCommandTest.php @@ -16,12 +16,12 @@ use Illuminate\Foundation\Testing\DatabaseMigrations; /** - * This is the command test class. + * This is the artisan command test class. * * @author Graham Campbell * @author James Brooks */ -class CommandTest extends AbstractTestCase +class ArtisanCommandTest extends AbstractTestCase { use DatabaseMigrations;