Skip to content

Commit b7058ca

Browse files
committed
YAML Test Runner: Updates is_false
- Checks that response is empty - Also tests that response is the string "false"
1 parent 3150403 commit b7058ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/BuildPHPUnitClass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,10 @@ protected function is_true(string $action): string
389389
protected function is_false(string $action): string
390390
{
391391
if (empty($action)) {
392-
return "\$this->assertNotEmpty(\$response->getBody()->getContents());\n";
392+
return "\$this->assertEmpty(\$response->getBody()->getContents());\n";
393393
}
394394
$key = $this->parseValue($action);
395-
return sprintf("\$this->assertTrue(!isset(%s) || !%s);\n", $key, $key);
395+
return sprintf("\$this->assertTrue(!isset(%s) || !%s || %s == 'false');\n", $key, $key, $key);
396396
}
397397

398398
protected function length(array $actions): string

0 commit comments

Comments
 (0)