mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-26 20:34:48 +01:00
test: add test case for abort()
This commit is contained in:
parent
7f15023e45
commit
a73188d9fa
@ -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