Skip to content

Commit 6c873a5

Browse files
author
Stiven Katuuk
committed
refactor(test): skip test with versio compare conditional
1 parent 72492c5 commit 6c873a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/AbleStoreNonBackedEnumTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
expect($latestActivity->description)->toEqual($description)
2222
->and($latestActivity->properties['role'])->toEqual('User');
2323
})
24-
->skip(! Str::of(PHP_VERSION)->startsWith('8.1'), "PHP doesn't support enum");
24+
->skip(version_compare(PHP_VERSION, '8.1', '<'), "PHP < 8.1 doesn't support enum");
2525

2626
it('can store non-backed enum with properties', function () {
2727
$description = 'ROLE LOG';
@@ -35,5 +35,5 @@
3535
expect($latestActivity->description)->toEqual($description)
3636
->and($latestActivity->properties['role'])->toEqual('User');
3737
})
38-
->skip(! Str::of(PHP_VERSION)->startsWith('8.1'), "PHP doesn't support enum");
38+
->skip(version_compare(PHP_VERSION, '8.1', '<'), "PHP < 8.1 doesn't support enum");
3939

0 commit comments

Comments
 (0)