mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Increase test coverage
This commit is contained in:
parent
d964f96439
commit
17d208bdd5
@ -284,6 +284,13 @@ class AnnotationTest extends TestCase
|
||||
}
|
||||
}',
|
||||
],
|
||||
'returnDocblock' => [
|
||||
'<?php
|
||||
function foo(int $i) : int {
|
||||
/** @var int */
|
||||
return $i;
|
||||
}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -240,6 +240,11 @@ class MethodSignatureTest extends TestCase
|
||||
}',
|
||||
'error_message' => 'MethodSignatureMismatch',
|
||||
],
|
||||
'misplacedRequiredParam' => [
|
||||
'<?php
|
||||
function foo($bar = null, $bat) : void {}',
|
||||
'error_message' => 'MisplacedRequiredParam',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -270,6 +270,14 @@ class UnusedCodeTest extends TestCase
|
||||
new A();',
|
||||
'error_message' => 'UnusedMethod',
|
||||
],
|
||||
'unevaluatedCode' => [
|
||||
'<?php
|
||||
function foo() : void {
|
||||
return;
|
||||
$a = "foo";
|
||||
}',
|
||||
'error_message' => 'UnevaluatedCode',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user