Skip to content

Commit 7bef887

Browse files
committed
Allow "rawr/cross-data-providers" version compatible with PHP 7.0
This version supposedly supports PHP 5.6, but seems to have different class names, so is not compatible. Instead, on 5.6, mark tests as skipped if they can't be run.
1 parent 4ecf7d9 commit 7bef887

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"require-dev": {
3030
"phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41",
31-
"rawr/cross-data-providers": "2.4.0"
31+
"rawr/cross-data-providers": "^2.0.0"
3232
},
3333
"suggest": {
3434
"ext-mbstring": "for parsing UTF-8 CSS"

tests/Unit/Position/PositionTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ public function setPositionWithNullForColumnNumberClearsColumnNumber()
184184
*/
185185
public function provideLineAndColumnNumber()
186186
{
187+
if (!\class_exists(DataProviders::class)) {
188+
self::markTestSkipped('`DataProviders` class is not available');
189+
return [];
190+
}
191+
187192
return DataProviders::cross($this->provideLineNumber(), $this->provideColumnNumber());
188193
}
189194

0 commit comments

Comments
 (0)