Skip to content

Commit 05f0ba7

Browse files
committed
Fixed the skipped test + usage of variables in Yaml tests
1 parent 62e82e4 commit 05f0ba7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

util/ActionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,10 @@ private function convertResponseField(string $field): string
419419
private function convertDollarValueInVariable(string $value): string
420420
{
421421
foreach ($this->variables as $var) {
422+
422423
$value = str_replace("\${{$var}}", "\$$var", $value);
423424
$value = str_replace("'\$$var'", "\$$var", $value);
424-
if (preg_match("/'[^']*\\\${$var}[^']*'/", $value)) {
425+
if (preg_match("/'[^']*\\\${$var}[^']*',/", $value)) {
425426
$value = str_replace("\$$var", "' . \$$var . '", $value);
426427
}
427428
}

util/YamlTests.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ public function build(): array
151151
$alreadyAssignedNames[] = $functionName;
152152

153153
$skippedTest = sprintf("%s\\%s::%s", $namespace, $testName, $functionName);
154-
$skip = self::$testSuite === 'oss' ? self::SKIPPED_TEST_OSS : self::SKIPPED_TEST_XPACK;
154+
$skip = strtolower(self::$testSuite) === 'oss'
155+
? self::SKIPPED_TEST_OSS
156+
: self::SKIPPED_TEST_XPACK;
155157
if (isset($skip[$skippedTest])) {
156158
$functions .= self::render(
157159
self::TEMPLATE_FUNCTION_SKIPPED,

0 commit comments

Comments
 (0)