Skip to content

Commit 39616d7

Browse files
xPawclxmstaab
andauthored
Use lowercase table name in tests to fix issue on Windows (#308)
Co-authored-by: Markus Staab <[email protected]>
1 parent 6a4f4f3 commit 39616d7

8 files changed

+36
-5
lines changed

src/Extensions/PdoStatementFetchDynamicReturnTypeExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ private function inferType(MethodReflection $methodReflection, MethodCall $metho
130130
if (QueryReflector::FETCH_TYPE_KEY_VALUE === $fetchType) {
131131
return $rowType;
132132
}
133+
133134
return new ArrayType(new IntegerType(), $rowType);
134135
}
135136

tests/rules/SyntaxErrorInQueryMethodRuleMysqliReflectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testSyntaxErrorInQueryRule(): void
5050
36,
5151
],
5252
[
53-
"Query error: Table 'phpstan_dba.unknownTable' doesn't exist (1146).",
53+
"Query error: Table 'phpstan_dba.unknown_table' doesn't exist (1146).",
5454
41,
5555
],
5656
[

tests/rules/SyntaxErrorInQueryMethodRulePdoReflectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testSyntaxErrorInQueryRule(): void
5050
36,
5151
],
5252
[
53-
"Query error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phpstan_dba.unknownTable' doesn't exist (42S02).",
53+
"Query error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phpstan_dba.unknown_table' doesn't exist (42S02).",
5454
41,
5555
],
5656
[

tests/rules/config/.phpstan-dba-mysqli.cache

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/rules/config/.phpstan-dba-pdo.cache

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/rules/config/.phpunit-phpstan-dba-mysqli.cache

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/rules/config/.phpunit-phpstan-dba-pdo.cache

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/rules/data/syntax-error-in-query-method.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function unknownGroupByColumn(PDO $pdo)
3838

3939
public function unknownTable(PDO $pdo)
4040
{
41-
$pdo->query('SELECT * FROM unknownTable', PDO::FETCH_ASSOC);
41+
$pdo->query('SELECT * FROM unknown_table', PDO::FETCH_ASSOC);
4242
}
4343

4444
public function incompleteQuery(PDO $pdo, string $tableName)

0 commit comments

Comments
 (0)