Skip to content

Commit

Permalink
Uninstall Folio and skip tests on Laravel <10
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerkretzmar committed Mar 20, 2024
1 parent 62f0f50 commit bcc76b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
with:
node-version: 20
cache: 'npm'
- run: composer remove laravel/folio --dev --no-update --no-interaction
if: matrix.laravel == 9
- run: composer require laravel/framework:"${{ matrix.laravel }}.*" --no-update --no-interaction
- uses: ramsey/composer-install@v2
with:
Expand Down
9 changes: 9 additions & 0 deletions tests/Unit/FolioTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@

class FolioTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();

if ((int) head(explode('.', app()->version())) < 10) {
$this->markTestSkipped('Folio requires Laravel >=10');
}
}

protected function tearDown(): void
{
File::deleteDirectories(resource_path('views'));
Expand Down

0 comments on commit bcc76b4

Please sign in to comment.