From 5644fd39535e0cef9f2d745e406b62f1684c80a7 Mon Sep 17 00:00:00 2001 From: Jesse Leite Date: Fri, 19 Jul 2024 12:35:42 -0400 Subject: [PATCH 1/2] Revert "Use absolute path in Configurator to pass failing tests." This reverts commit a695b45b380875ac72c33eefed5afb3915846391. --- src/Configurator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Configurator.php b/src/Configurator.php index de54689..bc369be 100644 --- a/src/Configurator.php +++ b/src/Configurator.php @@ -61,7 +61,7 @@ public function normalize() $this->preparePhpCsFixer(); - Process::run([__DIR__.'/../vendor/bin/php-cs-fixer', 'fix', $path, '--rules', $rules]); + Process::run(['vendor/bin/php-cs-fixer', 'fix', $path, '--rules', $rules]); return $this; } From 803ff9840bc254e4c8de5f341615c872db33f22a Mon Sep 17 00:00:00 2001 From: Jesse Leite Date: Mon, 22 Jul 2024 14:11:43 -0400 Subject: [PATCH 2/2] Swap instance of `Process` with custom base dir, like we do in other tests. --- tests/MigrateSiteTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/MigrateSiteTest.php b/tests/MigrateSiteTest.php index 8182105..32705a5 100644 --- a/tests/MigrateSiteTest.php +++ b/tests/MigrateSiteTest.php @@ -2,6 +2,7 @@ namespace Tests; +use Facades\Statamic\Console\Processes\Process; use Statamic\Facades\Path; use Statamic\Migrator\Configurator; use Statamic\Migrator\YAML; @@ -54,6 +55,8 @@ protected function setUp(): void $this->files->copyDirectory(__DIR__.'/Fixtures/site', base_path('site')); $this->files->copyDirectory(__DIR__.'/Fixtures/assets', base_path('assets')); $this->files->copy(__DIR__.'/Fixtures/routes/web.php', $this->paths('routesFile')); + + Process::swap(new \Statamic\Console\Processes\Process(__DIR__.'/../')); } /** @test */