1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 11:14:04 +00:00

Laravel 7 support (#304)

* Laravel 7 support

* Remove language from travis.yml

* Fix travis.yml

* Consistent indentation in travis.yml

* Use dev-master for phpcov

* Cleanup

* switch up envs

* verify both laravel versions are used

* 6 -> 7

* Fix travis yml

* Use stable phpcov

* Different installation for Laravel 7

* Indentation

* Fix dockerfile

* Fix indentation

* Fix tests

* Remove fail() calls
This commit is contained in:
Samuel Štancl 2020-03-17 18:47:24 +01:00 committed by GitHub
parent 526f0826a4
commit 30bab68b6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 218 additions and 37 deletions

View file

@ -127,7 +127,11 @@ class CommandsTest extends TestCase
mkdir($dir, 0777, true);
}
file_put_contents(app_path('Http/Kernel.php'), file_get_contents(__DIR__ . '/Etc/defaultHttpKernel.stub'));
if (app()->version()[0] === '6') {
file_put_contents(app_path('Http/Kernel.php'), file_get_contents(__DIR__ . '/Etc/defaultHttpKernelv6.stub'));
} else {
file_put_contents(app_path('Http/Kernel.php'), file_get_contents(__DIR__ . '/Etc/defaultHttpKernelv7.stub'));
}
$this->artisan('tenancy:install')
->expectsQuestion('Do you wish to publish the migrations that create these tables?', 'yes');
@ -136,7 +140,12 @@ class CommandsTest extends TestCase
$this->assertFileExists(database_path('migrations/2019_09_15_000010_create_tenants_table.php'));
$this->assertFileExists(database_path('migrations/2019_09_15_000020_create_domains_table.php'));
$this->assertDirectoryExists(database_path('migrations/tenant'));
$this->assertSame(file_get_contents(__DIR__ . '/Etc/modifiedHttpKernel.stub'), file_get_contents(app_path('Http/Kernel.php')));
if (app()->version()[0] === '6') {
$this->assertSame(file_get_contents(__DIR__ . '/Etc/modifiedHttpKernelv6.stub'), file_get_contents(app_path('Http/Kernel.php')));
} else {
$this->assertSame(file_get_contents(__DIR__ . '/Etc/modifiedHttpKernelv7.stub'), file_get_contents(app_path('Http/Kernel.php')));
}
}
/** @test */