diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 00000000..e9661ffa --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +C:30:"PHPUnit\Runner\TestResultCache":4920:{a:2:{s:7:"defects";a:6:{s:75:"Stancl\Tenancy\Tests\CacheManagerTest::default_tag_is_automatically_applied";i:6;s:72:"Stancl\Tenancy\Tests\CommandsTest::migrate_command_works_without_options";i:3;s:76:"Stancl\Tenancy\Tests\CommandsTest::migrate_command_works_with_tenants_option";i:3;s:57:"Stancl\Tenancy\Tests\CommandsTest::rollback_command_works";i:3;s:53:"Stancl\Tenancy\Tests\CommandsTest::seed_command_works";i:2;s:89:"Stancl\Tenancy\Tests\TenantDatabaseManagerTest::mysql_database_can_be_created_and_deleted";i:1;}s:5:"times";a:47:{s:75:"Stancl\Tenancy\Tests\BootstrapsTenancyTest::database_connection_is_switched";d:0.073;s:61:"Stancl\Tenancy\Tests\BootstrapsTenancyTest::redis_is_prefixed";d:0.014;s:66:"Stancl\Tenancy\Tests\BootstrapsTenancyTest::filesystem_is_suffixed";d:0.014;s:59:"Stancl\Tenancy\Tests\BootstrapsTenancyTest::cache_is_tagged";d:0.016;s:75:"Stancl\Tenancy\Tests\CacheManagerTest::default_tag_is_automatically_applied";d:0.015;s:75:"Stancl\Tenancy\Tests\CacheManagerTest::tags_are_merged_when_array_is_passed";d:0.014;s:76:"Stancl\Tenancy\Tests\CacheManagerTest::tags_are_merged_when_string_is_passed";d:0.017;s:104:"Stancl\Tenancy\Tests\CacheManagerTest::exception_is_thrown_when_zero_arguments_are_passed_to_tags_method";d:0.017;s:111:"Stancl\Tenancy\Tests\CacheManagerTest::exception_is_thrown_when_more_than_one_argument_is_passed_to_tags_method";d:0.017;s:70:"Stancl\Tenancy\Tests\CacheManagerTest::tags_separate_cache_well_enough";d:0.023;s:70:"Stancl\Tenancy\Tests\CacheManagerTest::invoking_the_cache_helper_works";d:0.023;s:82:"Stancl\Tenancy\Tests\CommandsTest::migrate_command_doesnt_change_the_db_connection";d:1.236;s:72:"Stancl\Tenancy\Tests\CommandsTest::migrate_command_works_without_options";d:0.282;s:76:"Stancl\Tenancy\Tests\CommandsTest::migrate_command_works_with_tenants_option";d:0.736;s:57:"Stancl\Tenancy\Tests\CommandsTest::rollback_command_works";d:0.975;s:53:"Stancl\Tenancy\Tests\CommandsTest::seed_command_works";d:0.01;s:65:"Stancl\Tenancy\Tests\DatabaseManagerTest::disconnect_method_works";d:0.014;s:88:"Stancl\Tenancy\Tests\FacadeTest::tenant_manager_can_be_accessed_using_the_Tenancy_facade";d:0.014;s:75:"Stancl\Tenancy\Tests\ReidentificationTest::storage_facade_roots_are_correct";d:0.015;s:66:"Stancl\Tenancy\Tests\ReidentificationTest::storage_path_is_correct";d:0.016;s:109:"Stancl\Tenancy\Tests\TenantAssetTest::asset_can_be_accessed_using_the_url_returned_by_the_tenant_asset_helper";d:0.028;s:90:"Stancl\Tenancy\Tests\TenantDatabaseManagerTest::sqlite_database_can_be_created_and_deleted";d:0.015;s:89:"Stancl\Tenancy\Tests\TenantDatabaseManagerTest::mysql_database_can_be_created_and_deleted";d:0.014;s:79:"Stancl\Tenancy\Tests\TenantDatabaseManagerTest::database_creation_can_be_queued";d:0.015;s:79:"Stancl\Tenancy\Tests\TenantDatabaseManagerTest::database_deletion_can_be_queued";d:0.014;s:87:"Stancl\Tenancy\Tests\TenantManagerTest::current_tenant_is_stored_in_the_tenant_property";d:0.014;s:52:"Stancl\Tenancy\Tests\TenantManagerTest::invoke_works";d:0.007;s:54:"Stancl\Tenancy\Tests\TenantManagerTest::initById_works";d:0.013;s:58:"Stancl\Tenancy\Tests\TenantManagerTest::findByDomain_works";d:0.008;s:59:"Stancl\Tenancy\Tests\TenantManagerTest::getIdByDomain_works";d:0.008;s:50:"Stancl\Tenancy\Tests\TenantManagerTest::find_works";d:0.014;s:59:"Stancl\Tenancy\Tests\TenantManagerTest::getTenantById_works";d:0.008;s:63:"Stancl\Tenancy\Tests\TenantManagerTest::init_returns_the_tenant";d:0.014;s:67:"Stancl\Tenancy\Tests\TenantManagerTest::initById_returns_the_tenant";d:0.014;s:74:"Stancl\Tenancy\Tests\TenantManagerTest::create_returns_the_supplied_domain";d:0.008;s:106:"Stancl\Tenancy\Tests\TenantManagerTest::findByDomain_throws_an_exception_when_an_unused_domain_is_supplied";d:0.008;s:63:"Stancl\Tenancy\Tests\TenantStorageTest::deleting_a_tenant_works";d:0.015;s:70:"Stancl\Tenancy\Tests\TenantStorageTest::set_is_a_working_alias_for_put";d:0.015;s:85:"Stancl\Tenancy\Tests\TenantStorageTest::put_works_with_key_and_value_as_separate_args";d:0.014;s:84:"Stancl\Tenancy\Tests\TenantStorageTest::put_works_with_key_and_value_as_a_single_arg";d:0.014;s:113:"Stancl\Tenancy\Tests\TenantStorageTest::put_on_the_current_tenant_pushes_the_value_into_the_tenant_property_array";d:0.014;s:115:"Stancl\Tenancy\Tests\TenantStorageTest::put_works_on_a_tenant_different_than_the_current_one_when_two_args_are_used";d:0.014;s:118:"Stancl\Tenancy\Tests\TenantStorageTest::put_works_on_a_tenant_different_than_the_current_one_when_a_single_arg_is_used";d:0.015;s:60:"Stancl\Tenancy\Tests\TenantStorageTest::arrays_can_be_stored";d:0.014;s:72:"Stancl\Tenancy\Tests\TenantStorageTest::associative_arrays_can_be_stored";d:0.013;s:89:"Stancl\Tenancy\Tests\TenantStorageTest::put_returns_the_value_when_two_arguments_are_used";d:0.014;s:102:"Stancl\Tenancy\Tests\TenantStorageTest::put_returns_the_key_value_pairs_when_a_single_argument_is_used";d:0.014;}}} \ No newline at end of file diff --git a/composer.json b/composer.json index 8af588ec..23740bb2 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,13 @@ } ], "require": { - "illuminate/support": "^5.8", + "illuminate/support": "5.8.*", "webpatser/laravel-uuid": "^3.0" }, "require-dev": { "orchestra/testbench": "~3.8", "laravel/framework": "5.8.*", - "vlucas/phpdotenv": "^2.2", + "vlucas/phpdotenv": "^3.3", "psy/psysh": "@stable", "league/flysystem-aws-s3-v3": "~1.0" }, @@ -42,5 +42,7 @@ "Tenancy": "Stancl\\Tenancy\\TenancyFacade" } } - } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index bd059996..504d4b15 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -9,7 +9,7 @@ class CommandsTest extends TestCase { public $autoInitTenancy = false; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -30,6 +30,7 @@ class CommandsTest extends TestCase /** @test */ public function migrate_command_works_without_options() { + $this->assertFalse(Schema::hasTable('users')); Artisan::call('tenants:migrate'); $this->assertFalse(Schema::hasTable('users')); tenancy()->init(); diff --git a/tests/TestCase.php b/tests/TestCase.php index 84e8f93f..0fcf25f1 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -14,7 +14,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase * * @return void */ - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -48,7 +48,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase protected function getEnvironmentSetUp($app) { if (file_exists(__DIR__ . '/../.env')) { - (new \Dotenv\Dotenv(__DIR__ . '/..'))->load(); + \Dotenv\Dotenv::create(__DIR__ . '/..')->load(); } $app['config']->set([