diff --git a/src/Generators/Webserver/Database/Drivers/PostgreSQL.php b/src/Generators/Webserver/Database/Drivers/PostgreSQL.php index 7407fa52..ac4d911f 100644 --- a/src/Generators/Webserver/Database/Drivers/PostgreSQL.php +++ b/src/Generators/Webserver/Database/Drivers/PostgreSQL.php @@ -143,8 +143,10 @@ protected function dropDatabase(IlluminateConnection $connection, array $config) protected function dropUser(IlluminateConnection $connection, array $config) { - if (config('tenancy.db.auto-delete-tenant-database-user') && $this->userExists($connection, - $config['username'])) { + if (config('tenancy.db.auto-delete-tenant-database-user') && $this->userExists( + $connection, + $config['username'] + )) { return $connection->statement("DROP USER \"{$config['username']}\""); } diff --git a/src/Website/Directory.php b/src/Website/Directory.php index 665603b9..b3905790 100644 --- a/src/Website/Directory.php +++ b/src/Website/Directory.php @@ -90,7 +90,8 @@ public function path(string $path = null, $local = false): string } if ($local && $this->isLocal()) { - $path = sprintf("%s%s", + $path = sprintf( + "%s%s", $this->filesystem->getAdapter()->getPathPrefix(), $path ); diff --git a/tests/traits/InteractsWithRoutes.php b/tests/traits/InteractsWithRoutes.php index 7c7b6d65..ed677d4e 100644 --- a/tests/traits/InteractsWithRoutes.php +++ b/tests/traits/InteractsWithRoutes.php @@ -33,7 +33,9 @@ protected function create_and_test_route(string $path, string $uri = null) } // Write a testing config. - $this->assertTrue($directory->put('routes.php', <<assertTrue($directory->put( + 'routes.php', + <<name('bar'); diff --git a/tests/unit-tests/Filesystem/LoadsConfigsTest.php b/tests/unit-tests/Filesystem/LoadsConfigsTest.php index ec277f0d..41ff2c1e 100644 --- a/tests/unit-tests/Filesystem/LoadsConfigsTest.php +++ b/tests/unit-tests/Filesystem/LoadsConfigsTest.php @@ -45,12 +45,14 @@ public function reads_additional_config() $this->assertTrue($this->directory->makeDirectory('config')); // Write a testing config. - $this->assertTrue($this->directory->put('config/test.php', <<assertTrue($this->directory->put( + 'config/test.php', + << 'bar']; EOM -)); + )); $this->assertTrue($this->directory->exists('config/test.php')); @@ -70,7 +72,9 @@ public function does_not_make_config_array() $this->assertTrue($this->directory->makeDirectory('config')); // Write a testing config. - $this->assertTrue($this->directory->put('config/app.php', <<assertTrue($this->directory->put( + 'config/app.php', + << 'bar']; @@ -93,7 +97,9 @@ public function blocks_blacklisted_configs() $this->assertTrue($this->directory->makeDirectory('config')); // Write a testing config. - $this->assertTrue($this->directory->put('config/database.php', <<assertTrue($this->directory->put( + 'config/database.php', + << 'bar']; diff --git a/tests/unit-tests/Filesystem/LoadsTranslationsTest.php b/tests/unit-tests/Filesystem/LoadsTranslationsTest.php index cfdcb154..7e3fd272 100644 --- a/tests/unit-tests/Filesystem/LoadsTranslationsTest.php +++ b/tests/unit-tests/Filesystem/LoadsTranslationsTest.php @@ -43,14 +43,16 @@ public function reads_additional_translations() $this->assertTrue($this->directory->makeDirectory('lang')); // Write a testing translation file. - $this->assertTrue($this->directory->put('lang/ch/test.php', <<assertTrue($this->directory->put( + 'lang/ch/test.php', + << 'bar' ]; EOM -)); + )); $this->assertTrue($this->directory->exists('lang/ch/test.php')); @@ -99,7 +101,9 @@ protected function saveAndConfirmTenantTranslation() $this->assertTrue($this->directory->makeDirectory('lang')); // Write a testing translation file. - $this->assertTrue($this->directory->put('lang/en/passwords.php', <<assertTrue($this->directory->put( + 'lang/en/passwords.php', + <<assertTrue($this->directory->makeDirectory('vendor')); // Write a testing config. - $this->assertTrue($this->directory->put('vendor/autoload.php', <<assertTrue($this->directory->put( + 'vendor/autoload.php', + <<assertTrue($this->directory->exists('vendor/autoload.php')); diff --git a/tests/unit-tests/Providers/RouteProviderTest.php b/tests/unit-tests/Providers/RouteProviderTest.php index 60ae18c2..b29614b1 100644 --- a/tests/unit-tests/Providers/RouteProviderTest.php +++ b/tests/unit-tests/Providers/RouteProviderTest.php @@ -25,7 +25,9 @@ class RouteProviderTest extends Test { protected function pathIdentified(string $path) { - file_put_contents("$path/routes/tenants.php", <<name('tenant');