Skip to content

Commit fbbb597

Browse files
Merge pull request #4 from punktDe/convert-null-string-to-null
Convert null string to null
2 parents bf0547e + b595471 commit fbbb597

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Classes/ActorTraits/Rest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function theApiResponseShouldReturnJsonStringWithFields(TableNode $table)
6565
foreach ($table->getRows() as $index => $row) {
6666
$row[1] = $row[1] === 'true' ? true : $row[1];
6767
$row[1] = $row[1] === 'false' ? false : $row[1];
68+
$row[1] = $row[1] === 'null' ? null : $row[1];
6869
$this->seeResponseContainsJson([$row[0] => $row[1]]);
6970
}
7071
}
@@ -84,6 +85,7 @@ public function theApiResponseStatusCodeShouldBe(string $statusCode)
8485
public function theApiResponseJsonPathFieldIsEqual(string $jsonPath, string $value)
8586
{
8687
$data = $this->grabDataFromResponseByJsonPath($jsonPath);
88+
$value = $value === 'null' ? null : $value;
8789
Assert::assertEquals(
8890
$value,
8991
$data[0],

0 commit comments

Comments
 (0)