tests/phpunit: fill in some phpstan types

This commit is contained in:
Dylan K. Taylor
2020-02-07 18:34:57 +00:00
parent 091873ca51
commit 95896eb911
2 changed files with 19 additions and 0 deletions

View File

@ -27,6 +27,10 @@ use PHPUnit\Framework\TestCase;
class ApiVersionTest extends TestCase{
/**
* @return \Generator|mixed[][]
* @phpstan-return \Generator<int, array{string, string, bool}, void, void>
*/
public function compatibleApiProvider() : \Generator{
yield ["3.0.0", "3.0.0", true];
yield ["3.1.0", "3.0.0", true];
@ -53,6 +57,10 @@ class ApiVersionTest extends TestCase{
self::assertSame($expected, ApiVersion::isCompatible($myVersion, [$wantVersion]), "my version: $myVersion, their version: $wantVersion, expect " . ($expected ? "yes" : "no"));
}
/**
* @return mixed[][][]
* @phpstan-return \Generator<int, array{list<string>, list<string>}, void, void>
*/
public function ambiguousVersionsProvider() : \Generator{
yield [["3.0.0"], []];
yield [["3.0.0", "3.0.1"], ["3.0.0", "3.0.1"]];