Skip to content

Commit 098e6c3

Browse files
wip beta support
1 parent 0dcfdab commit 098e6c3

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
],
1111
"require": {
1212
"ext-zip": "*",
13-
"statamic/cms": "6.0.0-alpha.15",
13+
"statamic/cms": "^6.0@beta",
1414
"pixelfear/composer-dist-plugin": "^0.1.6"
1515
},
1616
"require-dev": {
17-
"orchestra/testbench": "^9.0",
17+
"orchestra/testbench": "^10.0",
1818
"pestphp/pest": "^4.0",
1919
"pestphp/pest-plugin-laravel": "^4.0",
2020
"carthage-software/mago": "1.1.0"

tests/Feature/CreateBackupTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
use function Itiden\Backup\Tests\user;
1919
use function Pest\Laravel\actingAs;
20+
use function Pest\Laravel\artisan;
2021
use function Pest\Laravel\postJson;
2122
use function Statamic\trans;
2223

@@ -52,7 +53,7 @@
5253
it('can create backup from command', function (): void {
5354
expect(app(BackupRepository::class)->all()->count())->toBe(0);
5455

55-
$this->artisan('statamic:backup')->assertExitCode(0);
56+
artisan('statamic:backup')->assertExitCode(0);
5657

5758
expect(app(BackupRepository::class)->all()->count())->toBe(1);
5859
});
@@ -94,15 +95,13 @@
9495
});
9596

9697
it('sets created by metadata when user is authenticated', function (): void {
97-
$user = user();
98-
99-
$user->assignRole('admin')->save();
98+
$user = user()->assignRole('admin')->save();
10099

101100
actingAs($user);
102101

103102
postJson(cp_route('api.itiden.backup.store'));
104103

105-
expect(app(BackupRepository::class)->all()->first()->getMetadata()->getCreatedBy())->toBe($user);
104+
expect(app(BackupRepository::class)->all()->first()->getMetadata()->getCreatedBy()->id)->toBe($user->id);
106105
});
107106

108107
it('adds skipped pipes to meta', function (): void {

0 commit comments

Comments
 (0)