From cc1fd4b1ebe654a50f8173e78dd09a8115415ded Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 18 Feb 2025 17:07:50 +0000 Subject: [PATCH] Add a failing unit test to reproduce #52 --- tests/Type/Php/TypeAssertionsTest.php | 1 + tests/Type/Php/data/preg_match_asserted.php | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tests/Type/Php/data/preg_match_asserted.php diff --git a/tests/Type/Php/TypeAssertionsTest.php b/tests/Type/Php/TypeAssertionsTest.php index 120b85a..2214832 100644 --- a/tests/Type/Php/TypeAssertionsTest.php +++ b/tests/Type/Php/TypeAssertionsTest.php @@ -13,6 +13,7 @@ public static function dataFileAsserts(): iterable { yield from self::gatherAssertTypes(__DIR__ . '/data/preg_match_unchecked.php'); yield from self::gatherAssertTypes(__DIR__ . '/data/preg_match_checked.php'); + yield from self::gatherAssertTypes(__DIR__ . '/data/preg_match_asserted.php'); yield from self::gatherAssertTypes(__DIR__ . '/data/preg_replace_return.php'); } diff --git a/tests/Type/Php/data/preg_match_asserted.php b/tests/Type/Php/data/preg_match_asserted.php new file mode 100644 index 0000000..8d48831 --- /dev/null +++ b/tests/Type/Php/data/preg_match_asserted.php @@ -0,0 +1,20 @@ +