From 083da24551c9d69e52dfd83ef4969d91c967f6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 12 Jun 2022 02:53:04 +0200 Subject: [PATCH] qa: add more specific unit test(s) for the `oneOf` detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- tests/AssertAnnotationTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/AssertAnnotationTest.php b/tests/AssertAnnotationTest.php index 5a767a9af..b9e928a6c 100644 --- a/tests/AssertAnnotationTest.php +++ b/tests/AssertAnnotationTest.php @@ -2066,6 +2066,9 @@ class AssertAnnotationTest extends TestCase */ function assertOneOf($input, array $values): void {} + /** @param "a" $value */ + function consumeSpecificStringValue(string $value): void {} + /** @param literal-string $value */ function consumeLiteralStringValue(string $value): void {} @@ -2077,6 +2080,9 @@ class AssertAnnotationTest extends TestCase $mixed; assertOneOf($string, ["a"]); + consumeSpecificStringValue($string); + + assertOneOf($string, ["a", "b", "c"]); consumeLiteralStringValue($string); assertOneOf($mixed, [1, 2, 3]);