Merge pull request #171 from caugner/test-abort

test: add test case for abort()
This commit is contained in:
feek 2021-07-06 14:24:43 -04:00 committed by GitHub
commit 935357a7c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,21 @@ Feature: abort_if()
<?php declare(strict_types=1); <?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 Scenario: abort_if asserts not null
Given I have the following code Given I have the following code
""" """