From b5e5dd164b6fd243f548647375fa3f152f4b0405 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 28 Oct 2024 15:00:16 +0100 Subject: [PATCH] move test --- tests/default/DbaInferenceTest.php | 1 - tests/default/data/bug-680.php | 23 ----------------------- tests/default/data/doctrine-dbal.php | 11 +++++++++++ 3 files changed, 11 insertions(+), 24 deletions(-) delete mode 100644 tests/default/data/bug-680.php diff --git a/tests/default/DbaInferenceTest.php b/tests/default/DbaInferenceTest.php index eb18311b2..0aa792d15 100644 --- a/tests/default/DbaInferenceTest.php +++ b/tests/default/DbaInferenceTest.php @@ -20,7 +20,6 @@ public function dataFileAsserts(): iterable yield from $this->gatherAssertTypes(__DIR__ . '/data/doctrine-dbal.php'); yield from $this->gatherAssertTypes(__DIR__ . '/data/inference-placeholder.php'); - yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-680.php'); } // make sure class constants can be resolved diff --git a/tests/default/data/bug-680.php b/tests/default/data/bug-680.php deleted file mode 100644 index a648a8be7..000000000 --- a/tests/default/data/bug-680.php +++ /dev/null @@ -1,23 +0,0 @@ -connection - ->fetchAssociative( - '#cart-persister::load - SELECT email, adaid, "xy" as b FROM ada WHERE adaid = :token', - ['token' => $token], - ); - assertType('array{email: string, adaid: int<-32768, 32767>, b: string}|false', $content); - } -} diff --git a/tests/default/data/doctrine-dbal.php b/tests/default/data/doctrine-dbal.php index d02eb8825..b1954d42c 100644 --- a/tests/default/data/doctrine-dbal.php +++ b/tests/default/data/doctrine-dbal.php @@ -228,4 +228,15 @@ public function customTypeParameters(Connection $conn) ); assertType('Doctrine\DBAL\Result', $result); } + + public function doFoo(Connection $conn, string $token): void + { + $content = $conn + ->fetchAssociative( + '#cart-persister::load + SELECT email, adaid FROM ada WHERE adaid = :token', + ['token' => $token], + ); + assertType('array{email: string, adaid: int<-32768, 32767>}|false', $content); + } }