X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/786a434c03faa996e630f4a0a523567d3b093f43..refs/pull/5721/head:/tests/ThemeTest.php diff --git a/tests/ThemeTest.php b/tests/ThemeTest.php index b3c85d8f7..4dff38418 100644 --- a/tests/ThemeTest.php +++ b/tests/ThemeTest.php @@ -46,7 +46,7 @@ class ThemeTest extends TestCase $functionsFile = theme_path('functions.php'); app()->alias('cat', 'dog'); file_put_contents($functionsFile, "alias('cat', 'dog');});"); - $this->runWithEnv('APP_THEME', $themeFolder, function () { + $this->runWithEnv(['APP_THEME' => $themeFolder], function () { $this->assertEquals('cat', $this->app->getAlias('dog')); }); }); @@ -61,7 +61,7 @@ class ThemeTest extends TestCase $this->expectException(ThemeException::class); $this->expectExceptionMessageMatches('/Failed loading theme functions file at ".*?" with error: Class "BookStack\\\\Biscuits" not found/'); - $this->runWithEnv('APP_THEME', $themeFolder, fn() => null); + $this->runWithEnv(['APP_THEME' => $themeFolder], fn() => null); }); } @@ -504,7 +504,7 @@ END; $this->beforeApplicationDestroyed(fn() => File::deleteDirectory($themeFolderPath)); // Run provided callback with theme env option set - $this->runWithEnv('APP_THEME', $themeFolderName, function () use ($callback, $themeFolderName) { + $this->runWithEnv(['APP_THEME' => $themeFolderName], function () use ($callback, $themeFolderName) { call_user_func($callback, $themeFolderName); }); }