Skip to content

Commit d3f8924

Browse files
committed
Fix entity name and hostnames
1 parent d861d30 commit d3f8924

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/platform-matrix-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
services:
4242
postgres:
4343
image: "postgres:latest"
44+
options: --hostname pgsql
4445
env:
4546
POSTGRES_PASSWORD: "secret"
4647
POSTGRES_USER: root
@@ -50,6 +51,7 @@ jobs:
5051

5152
mysql:
5253
image: "mysql:latest"
54+
options: --hostname mysql
5355
env:
5456
MYSQL_ALLOW_EMPTY_PASSWORD: yes
5557
MYSQL_ROOT_PASSWORD: secret

tests/Platform/MatrixEntity/TestEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TestEntity
4949
/**
5050
* @ORM\Id
5151
* @ORM\Column(type="bigint", name="col_bigint", nullable=false)
52-
* @var int
52+
* @var string
5353
*/
5454
public $col_bigint;
5555

tests/Platform/QueryResultTypeWalkerFetchTypeMatrixTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ public function testFetchedTypes(
109109
$entity->col_float = 0.125;
110110
$entity->col_decimal = '0.1';
111111
$entity->col_int = 9;
112-
$entity->col_bigint = 2147483648;
112+
$entity->col_bigint = '2147483648';
113113
$entity->col_string = 'foobar';
114114

115115
$entityManager->persist($entity);
116116
$entityManager->flush();
117117

118-
$columnsQueryTemplate = 'SELECT %s FROM MatrixEntity\TestEntity t GROUP BY t.col_int, t.col_float, t.col_decimal, t.col_bigint, t.col_bool, t.col_string';
118+
$columnsQueryTemplate = 'SELECT %s FROM %s t GROUP BY t.col_int, t.col_float, t.col_decimal, t.col_bigint, t.col_bool, t.col_string';
119119

120120
$expected = $phpVersion >= 81
121121
? $expectedOnPhp81AndAbove
@@ -125,7 +125,7 @@ public function testFetchedTypes(
125125
if ($expectedType === null) {
126126
continue; // e.g. no such function
127127
}
128-
$dql = sprintf($columnsQueryTemplate, $select);
128+
$dql = sprintf($columnsQueryTemplate, $select, TestEntity::class);
129129

130130
$query = $entityManager->createQuery($dql);
131131
$result = $query->getSingleResult();

0 commit comments

Comments
 (0)