Skip to content

Commit 049625f

Browse files
Supports Laravel 12 (#92)
* Allow Testbench 10 & PHPUnit 11 in composer.json * Add Laravel 12 to testing matrix * Use the `Storage` facade to build the path, rather than the `storage_path` helper
1 parent 11b4067 commit 049625f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
php: [8.2, 8.3, 8.4]
16-
laravel: [10.*, 11.*]
16+
laravel: [10.*, 11.*, 12.*]
1717
stability: [prefer-lowest, prefer-stable]
1818
os: [ubuntu-latest]
1919
exclude:

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
},
2121
"require-dev": {
2222
"laravel/pint": "^1.18",
23-
"orchestra/testbench": "^8.28 || ^9.6.1",
24-
"phpunit/phpunit": "^10.5.35",
23+
"orchestra/testbench": "^8.28 || ^9.6.1 || ^10.0",
24+
"phpunit/phpunit": "^10.5.35 || ^11.0",
2525
"spatie/laravel-ray": "^1.39"
2626
},
2727
"config": {

tests/Imports/StoreImportTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function it_stores_a_collection_import()
5454
$this->assertNotNull($import);
5555
$this->assertEquals('Posts', $import->name());
5656
$this->assertEquals('csv', $import->get('type'));
57-
$this->assertEquals(storage_path('app/statamic/imports/posts/import.csv'), $import->get('path'));
57+
$this->assertEquals(Storage::path('statamic/imports/posts/import.csv'), $import->get('path'));
5858
$this->assertEquals(['create', 'update'], $import->get('strategy'));
5959
}
6060

@@ -91,7 +91,7 @@ public function it_stores_a_collection_import_with_a_site()
9191
$this->assertNotNull($import);
9292
$this->assertEquals('Posts', $import->name());
9393
$this->assertEquals('csv', $import->get('type'));
94-
$this->assertEquals(storage_path('app/statamic/imports/posts/import.csv'), $import->get('path'));
94+
$this->assertEquals(Storage::path('statamic/imports/posts/import.csv'), $import->get('path'));
9595
$this->assertEquals(['create', 'update'], $import->get('strategy'));
9696

9797
$this->assertEquals('en', $import->get('destination.site'));
@@ -185,7 +185,7 @@ public function it_stores_a_taxonomy_import()
185185
$this->assertNotNull($import);
186186
$this->assertEquals('Categories', $import->name());
187187
$this->assertEquals('csv', $import->get('type'));
188-
$this->assertEquals(storage_path('app/statamic/imports/categories/import.csv'), $import->get('path'));
188+
$this->assertEquals(Storage::path('statamic/imports/categories/import.csv'), $import->get('path'));
189189
$this->assertEquals(['create', 'update'], $import->get('strategy'));
190190
}
191191

@@ -212,7 +212,7 @@ public function it_stores_a_user_import()
212212
$this->assertNotNull($import);
213213
$this->assertEquals('Users', $import->name());
214214
$this->assertEquals('csv', $import->get('type'));
215-
$this->assertEquals(storage_path('app/statamic/imports/users/import.csv'), $import->get('path'));
215+
$this->assertEquals(Storage::path('statamic/imports/users/import.csv'), $import->get('path'));
216216
$this->assertEquals(['create', 'update'], $import->get('strategy'));
217217
}
218218

0 commit comments

Comments
 (0)