Skip to content

Commit e115153

Browse files
committed
Fix importing revisions...
Recent changes to revisions in Statamic broke the importer command's tests. This commit makes the necessary changes to get the tests passing again. Related: #514
1 parent 7dfbee2 commit e115153

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Commands/ImportRevisions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function handle(): int
4545

4646
private function importRevisions(): void
4747
{
48-
$this->withProgressBar(File::allFiles(config('statamic.revisions.path')), function ($file) {
48+
$this->withProgressBar(File::allFiles(config('statamic.stache.stores.revisions.directory')), function ($file) {
4949
$yaml = YAML::file($file->getPathname())->parse();
5050

5151
$revision = (new Revision)

tests/Commands/ImportRevisionsTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ protected function setUp(): void
2222

2323
config()->set('statamic.revisions', [
2424
'enabled' => true,
25-
'path' => __DIR__.'/tmp',
2625
]);
2726

28-
mkdir(__DIR__.'/tmp');
27+
config()->set('statamic.stache.stores.revisions.directory', __DIR__.'/../__fixtures__/dev-null/storage/statamic/revisions');
2928

3029
Facade::clearResolvedInstance(RevisionRepositoryContract::class);
3130

@@ -35,7 +34,7 @@ protected function setUp(): void
3534

3635
protected function tearDown(): void
3736
{
38-
app('files')->deleteDirectory(__DIR__.'/tmp');
37+
app('files')->deleteDirectory(config('statamic.stache.stores.revisions.directory'));
3938

4039
parent::tearDown();
4140
}

0 commit comments

Comments
 (0)