test: add test case for abort()

This commit is contained in:
Claas Augner 2021-07-06 16:18:23 +02:00
parent 7f15023e45
commit a73188d9fa

View File

@ -20,6 +20,21 @@ Feature: abort_if
<?php declare(strict_types=1);
"""
Scenario: abort asserts not null
Given I have the following code
"""
/**
* @param string|null $nullable
*/
function test($nullable): string {
if (!$nullable) {
abort(422);
}
return $nullable;
}
"""
Scenario: abort_if asserts not null
Given I have the following code
"""