Skip to content

Commit 72492c5

Browse files
author
Stiven Katuuk
committed
fix: test strict skipping conditional base on php version
1 parent fc49a83 commit 72492c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/AbleStoreNonBackedEnumTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Spatie\Activitylog\Test;
44

5+
use Illuminate\Support\Str;
56
use Spatie\Activitylog\Test\Enum\NonBackedEnum;
67
use Spatie\Activitylog\Test\Models\Activity;
78
use Spatie\Activitylog\Test\Models\User;
@@ -20,7 +21,7 @@
2021
expect($latestActivity->description)->toEqual($description)
2122
->and($latestActivity->properties['role'])->toEqual('User');
2223
})
23-
->skip(! function_exists('enum_exists'), "PHP doesn't support enum");
24+
->skip(! Str::of(PHP_VERSION)->startsWith('8.1'), "PHP doesn't support enum");
2425

2526
it('can store non-backed enum with properties', function () {
2627
$description = 'ROLE LOG';
@@ -34,4 +35,5 @@
3435
expect($latestActivity->description)->toEqual($description)
3536
->and($latestActivity->properties['role'])->toEqual('User');
3637
})
37-
->skip(! function_exists('enum_exists'), "PHP doesn't support enum");
38+
->skip(! Str::of(PHP_VERSION)->startsWith('8.1'), "PHP doesn't support enum");
39+

0 commit comments

Comments
 (0)