Skip to content

Commit ba5f18a

Browse files
committed
Revert "move test"
This reverts commit b5e5dd1.
1 parent 01cf1b8 commit ba5f18a

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

tests/default/DbaInferenceTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function dataFileAsserts(): iterable
2020

2121
yield from $this->gatherAssertTypes(__DIR__ . '/data/doctrine-dbal.php');
2222
yield from $this->gatherAssertTypes(__DIR__ . '/data/inference-placeholder.php');
23+
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-680.php');
2324
}
2425

2526
// make sure class constants can be resolved

tests/default/data/bug-680.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Bug680;
4+
5+
use Doctrine\DBAL\Connection;
6+
use function PHPStan\Testing\assertType;
7+
8+
class Test
9+
{
10+
private Connection $connection;
11+
12+
public function doFoo(string $token): void
13+
{
14+
$content = $this
15+
->connection
16+
->fetchAssociative(
17+
'#cart-persister::load
18+
SELECT email, adaid, "xy" as b FROM ada WHERE adaid = :token',
19+
['token' => $token],
20+
);
21+
assertType('array{email: string, adaid: int<-32768, 32767>, b: string}|false', $content);
22+
}
23+
}

tests/default/data/doctrine-dbal.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,4 @@ public function customTypeParameters(Connection $conn)
228228
);
229229
assertType('Doctrine\DBAL\Result', $result);
230230
}
231-
232-
public function doFoo(Connection $conn, string $token): void
233-
{
234-
$content = $conn
235-
->fetchAssociative(
236-
'#cart-persister::load
237-
SELECT email, adaid FROM ada WHERE adaid = :token',
238-
['token' => $token],
239-
);
240-
assertType('array{email: string, adaid: int<-32768, 32767>}|false', $content);
241-
}
242231
}

0 commit comments

Comments
 (0)