Skip to content

Commit

Permalink
Fix settings migration regression (#118)
Browse files Browse the repository at this point in the history
* Revert "Use absolute path in Configurator to pass failing tests."

This reverts commit a695b45.

* Swap instance of `Process` with custom base dir, like we do in other tests.
  • Loading branch information
jesseleite authored Jul 22, 2024
1 parent eabf7ca commit 4d349b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Configurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions tests/MigrateSiteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Tests;

use Facades\Statamic\Console\Processes\Process;
use Statamic\Facades\Path;
use Statamic\Migrator\Configurator;
use Statamic\Migrator\YAML;
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 4d349b7

Please sign in to comment.