1
0
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:
Matthew Brown 2017-12-30 10:54:01 -05:00
parent d964f96439
commit 17d208bdd5
3 changed files with 20 additions and 0 deletions

View File

@ -284,6 +284,13 @@ class AnnotationTest extends TestCase
}
}',
],
'returnDocblock' => [
'<?php
function foo(int $i) : int {
/** @var int */
return $i;
}',
],
];
}

View File

@ -240,6 +240,11 @@ class MethodSignatureTest extends TestCase
}',
'error_message' => 'MethodSignatureMismatch',
],
'misplacedRequiredParam' => [
'<?php
function foo($bar = null, $bat) : void {}',
'error_message' => 'MisplacedRequiredParam',
],
];
}
}

View File

@ -270,6 +270,14 @@ class UnusedCodeTest extends TestCase
new A();',
'error_message' => 'UnusedMethod',
],
'unevaluatedCode' => [
'<?php
function foo() : void {
return;
$a = "foo";
}',
'error_message' => 'UnevaluatedCode',
],
];
}
}