Skip to content

Commit 5af4c53

Browse files
committed
Add explicit skip for empty parse/serialize test rulesets
1 parent f63dfaa commit 5af4c53

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/RulesetTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,34 @@ protected function rulesetDataProvider(): array
8080

8181
public function parseRulesetDataProvider(): array
8282
{
83-
return array_filter(
83+
$tests = array_filter(
8484
static::rulesetDataProvider(),
8585
function ($params) {
8686
return !empty($params[0]->raw);
8787
}
8888
);
89+
90+
if (empty($tests)) {
91+
$this->markTestSkipped("No parse rules");
92+
}
93+
94+
return $tests;
8995
}
9096

9197
public function serializeRulesetDataProvider(): array
9298
{
93-
return array_filter(
99+
$tests = array_filter(
94100
static::rulesetDataProvider(),
95101
function ($params) {
96102
return !empty($params[0]->expected);
97103
}
98104
);
105+
106+
if (empty($tests)) {
107+
$this->markTestSkipped("No serialize rules");
108+
}
109+
110+
return $tests;
99111
}
100112

101113
/**

0 commit comments

Comments
 (0)