Skip to content

Commit 5615fc5

Browse files
committed
Use str_starts_with instead of regex logic
1 parent b1b1260 commit 5615fc5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/UnifiedSpecTests/UnifiedSpecTest.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
use function basename;
1515
use function dirname;
1616
use function glob;
17-
use function preg_match;
18-
use function sprintf;
17+
use function str_starts_with;
1918

2019
/**
2120
* Unified test format spec tests.
@@ -101,7 +100,7 @@ public function setUp(): void
101100
}
102101

103102
foreach (self::$incompleteTestGroups as $testGroup => $reason) {
104-
if (preg_match(sprintf('#^%s#', $testGroup), $this->dataDescription())) {
103+
if (str_starts_with($this->dataDescription(), $testGroup)) {
105104
$this->markTestIncomplete($reason);
106105
}
107106
}

0 commit comments

Comments
 (0)