Skip to content

Commit 3ed8267

Browse files
committed
Fix command tests
1 parent aec0324 commit 3ed8267

11 files changed

Lines changed: 12 additions & 12 deletions

tests/Feature/Console/Commands/Gql/ListSchemasCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
it('resolves slash aliases', function () {
3333
$schema = saveGraphqlCommandSchema(['name' => 'Alias Schema']);
3434

35-
$this->artisan('graphql/list-schemas')
35+
$this->artisan('craft:graphql/list-schemas')
3636
->expectsTable(
3737
['UID', 'Name'],
3838
[

tests/Feature/Console/Commands/Utils/FixElementUidsCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
->whereIn('id', [$firstElement->id, $secondElement->id, $thirdElement->id])
2424
->update(['uid' => $duplicateUid]);
2525

26-
$this->artisan('utils/fix-element-uids')
26+
$this->artisan('craft:utils/fix-element-uids')
2727
->expectsOutputToContain('Found 3 elements with duplicate UIDs.')
2828
->expectsOutputToContain("Changing $duplicateUid ({$secondElement->id})")
2929
->expectsOutputToContain("Changing $duplicateUid ({$thirdElement->id})")

tests/Feature/Console/Commands/Utils/FixFieldLayoutUidsCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
ProjectConfig::regenerateExternalConfig();
7979

80-
$this->artisan('utils/fix-field-layout-uids')
80+
$this->artisan('craft:utils/fix-field-layout-uids')
8181
->expectsOutputToContain('Looking for duplicate UUIDs ...')
8282
->expectsOutputToContain("Missing UUID found at testFixture.first.fieldLayouts.$fieldLayoutUid.tabs.0.elements.1")
8383
->expectsOutputToContain("Duplicate UUID at testFixture.second.fieldLayouts.$fieldLayoutUid.tabs.0")

tests/Feature/Console/Commands/Utils/PruneOrphanedEntriesCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
$supportedEntry->element->siteSettings->first()->update(['siteId' => $secondSite->id]);
5353

54-
$this->artisan('utils/prune-orphaned-entries')
54+
$this->artisan('craft:utils/prune-orphaned-entries')
5555
->expectsOutputToContain(sprintf('Site "%s"', Site::first()->name))
5656
->expectsOutputToContain(sprintf('Site "%s"', $secondSite->name))
5757
->expectsOutputToContain("Deleting entry {$orphanedEntry->id} in {$secondSite->name}")

tests/Feature/Console/Commands/Utils/PruneProvisionalDraftsCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
app(Drafts::class)->createDraft($canonical, $this->user->id, provisional: true);
2929
app(Drafts::class)->createDraft($canonical, $this->user->id, provisional: true);
3030

31-
$this->artisan('utils/prune-provisional-drafts', ['--dry-run' => true])
31+
$this->artisan('craft:utils/prune-provisional-drafts', ['--dry-run' => true])
3232
->expectsOutputToContain('[DRY RUN] Finished pruning extra provisional drafts. 1 provisional draft matched.')
3333
->assertSuccessful();
3434

tests/Feature/Console/Commands/Utils/PruneRevisionsCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
app(Revisions::class)->createRevision($entry, $this->user->id);
3434
app(Revisions::class)->createRevision($entry, $this->user->id, force: true);
3535

36-
$this->artisan('utils/prune-revisions', ['--max-revisions' => 1, '--dry-run' => true, '--no-interaction' => true])
36+
$this->artisan('craft:utils/prune-revisions', ['--max-revisions' => 1, '--dry-run' => true, '--no-interaction' => true])
3737
->expectsOutputToContain('[DRY RUN] Finished pruning revisions. 1 revision matched.')
3838
->assertSuccessful();
3939

tests/Feature/Element/Commands/DeleteAllOfTypeCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
insertSearchIndexRow($entry->id);
2727

28-
$this->artisan('elements/delete-all-of-type', ['type' => Entry::class, '--dry-run' => true])
28+
$this->artisan('craft:elements/delete-all-of-type', ['type' => Entry::class, '--dry-run' => true])
2929
->expectsOutputToContain('[DRY RUN] 1 entry deleted.')
3030
->assertSuccessful();
3131

tests/Feature/Element/Commands/DeleteCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
$entry = EntryModel::factory()->createElement();
1818

19-
$this->artisan('elements/delete', ['id' => $entry->id, '--no-interaction' => true])
19+
$this->artisan('craft:elements/delete', ['id' => $entry->id, '--no-interaction' => true])
2020
->expectsOutputToContain('Element deleted.')
2121
->assertSuccessful();
2222

tests/Feature/Element/Commands/RestoreCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
$entry = EntryModel::factory()->createElement();
1616
Elements::deleteElement($entry);
1717

18-
$this->artisan('elements/restore', ['id' => $entry->id])
18+
$this->artisan('craft:elements/restore', ['id' => $entry->id])
1919
->expectsOutputToContain('Element restored.')
2020
->assertSuccessful();
2121

tests/Feature/Entry/Commands/UpdateStatusesCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
it('supports the legacy aliases', function (string $command) {
7575
$this->artisan($command)->assertSuccessful();
7676
})->with([
77-
'legacy alias' => 'update-statuses',
78-
'legacy action alias' => 'update-statuses/index',
77+
'legacy alias' => 'craft:update-statuses',
78+
'legacy action alias' => 'craft:update-statuses/index',
7979
]);
8080

8181
it('continues after a save failure and still succeeds', function () {

0 commit comments

Comments
 (0)