From 84b09aa21e7bd22de90c6113cb43b4f41f5fa042 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 5 Jan 2024 06:49:48 +0800 Subject: [PATCH 1/5] wip Signed-off-by: Mior Muhammad Zaki --- tests/Attributes/WithEnvTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Attributes/WithEnvTest.php b/tests/Attributes/WithEnvTest.php index 3a5956e0c..a63e06e40 100644 --- a/tests/Attributes/WithEnvTest.php +++ b/tests/Attributes/WithEnvTest.php @@ -13,6 +13,14 @@ */ class WithEnvTest extends TestCase { + /** + * Teardown the test environment. + */ + protected function tearDown(): void + { + m::close(); + } + /** @test */ public function it_can_resolve_defined_env_variables() { From 78db9f5bc60fa309172a77c2d9d46dbe3d7b1ba2 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 10 Jan 2024 10:38:51 +0800 Subject: [PATCH 2/5] wip Signed-off-by: Mior Muhammad Zaki --- src/Concerns/HandlesRoutes.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/Concerns/HandlesRoutes.php b/src/Concerns/HandlesRoutes.php index 9f1f299c7..cb14c610d 100644 --- a/src/Concerns/HandlesRoutes.php +++ b/src/Concerns/HandlesRoutes.php @@ -76,33 +76,22 @@ protected function defineWebRoutes($router) */ protected function defineCacheRoutes(string $route) { - $join_paths = function ($basePath, ...$paths) { - foreach ($paths as $index => $path) { - if (empty($path)) { - unset($paths[$index]); - } else { - $paths[$index] = DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR); - } - } - - return $basePath.implode('', $paths); - }; - $files = new Filesystem(); $time = time(); $basePath = static::applicationBasePath(); - $bootstrapPath = $join_paths($basePath, 'bootstrap'); + + $laravel = Application::create($basePath); $files->put( - $join_paths($basePath, 'routes', "testbench-{$time}.php"), $route + $laravel->basePath("routes/testbench-{$time}.php"), $route ); remote('route:cache')->mustRun(); $this->assertTrue( - $files->exists($join_paths($bootstrapPath, 'cache', 'routes-v7.php')) + $files->exists($laravel->bootstrapPath('cache/routes-v7.php')) ); if ($this->app instanceof LaravelApplication) { From b434a811e4b0723c70540771a319cfb602938503 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 10 Jan 2024 10:41:24 +0800 Subject: [PATCH 3/5] wip Signed-off-by: Mior Muhammad Zaki --- src/Concerns/HandlesRoutes.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Concerns/HandlesRoutes.php b/src/Concerns/HandlesRoutes.php index cb14c610d..46571b9f8 100644 --- a/src/Concerns/HandlesRoutes.php +++ b/src/Concerns/HandlesRoutes.php @@ -80,9 +80,7 @@ protected function defineCacheRoutes(string $route) $time = time(); - $basePath = static::applicationBasePath(); - - $laravel = Application::create($basePath); + $laravel = Application::create(static::applicationBasePath()); $files->put( $laravel->basePath("routes/testbench-{$time}.php"), $route From cba9f553c26bc836e185124b09e2647d22f21d5a Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 10 Jan 2024 10:48:54 +0800 Subject: [PATCH 4/5] Prepare 6.46.0 release Signed-off-by: Mior Muhammad Zaki --- CHANGELOG-6.x.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index 51f20daab..04d03f5a3 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -2,7 +2,9 @@ This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench-core`. -## Unreleased +## 6.46.0 + +Released: 2024-01-10 ### Added From b8b56acd33e75a0d2e502864895e8fa29a197557 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 10 Jan 2024 10:57:39 +0800 Subject: [PATCH 5/5] Prepare 7.39.1 release Signed-off-by: Mior Muhammad Zaki --- CHANGELOG-7.x.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG-7.x.md b/CHANGELOG-7.x.md index bb4745af6..fc0b452fb 100644 --- a/CHANGELOG-7.x.md +++ b/CHANGELOG-7.x.md @@ -2,6 +2,15 @@ This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench-core`. +## 7.39.1 + +Released: 2024-01-10 + +### Changes + +* Run `route:cache` using `Orchestra\Testbench\remote` function. +* Add `Orchestra\Testbench\Concerns\InteractsWithTestCase` to `setUpTheTestEnvironmentTraitToBeIgnored` method. + ## 7.39.0 Released: 2023-12-28