mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-30 04:39:01 +01:00
Merge pull request #171 from caugner/test-abort
test: add test case for abort()
This commit is contained in:
commit
935357a7c8
@ -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
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user