Skip to content

Commit 1b15af4

Browse files
committed
Remove similar assertions for other platforms
Testing with several platforms should not increase code coverage here, since the DBAL is responsible for providing the concat expression for each platform. Moreover, whenever that concat expression changes for one of the tested platforms, this test will break. In doctrine/dbal 3.2, that is the case for SQLServer2012Platform, which means this test no longer passes.
1 parent 8336420 commit 1b15af4

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,26 +2116,6 @@ public function testSupportsMoreThanTwoParametersInConcatFunction(): void
21162116
'SELECT CONCAT(c0_.id, c0_.name, c0_.status) AS sclr_0 FROM cms_users c0_ WHERE c0_.id = ?'
21172117
);
21182118

2119-
$connMock->setDatabasePlatform(new PostgreSQL94Platform());
2120-
$this->assertSqlGeneration(
2121-
"SELECT u.id FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE CONCAT(u.name, u.status, 's') = ?1",
2122-
"SELECT c0_.id AS id_0 FROM cms_users c0_ WHERE c0_.name || c0_.status || 's' = ?"
2123-
);
2124-
$this->assertSqlGeneration(
2125-
'SELECT CONCAT(u.id, u.name, u.status) FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1',
2126-
'SELECT c0_.id || c0_.name || c0_.status AS sclr_0 FROM cms_users c0_ WHERE c0_.id = ?'
2127-
);
2128-
2129-
$connMock->setDatabasePlatform(new SQLServer2012Platform());
2130-
$this->assertSqlGeneration(
2131-
"SELECT u.id FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE CONCAT(u.name, u.status, 's') = ?1",
2132-
"SELECT c0_.id AS id_0 FROM cms_users c0_ WHERE (c0_.name + c0_.status + 's') = ?"
2133-
);
2134-
$this->assertSqlGeneration(
2135-
'SELECT CONCAT(u.id, u.name, u.status) FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1',
2136-
'SELECT (c0_.id + c0_.name + c0_.status) AS sclr_0 FROM cms_users c0_ WHERE c0_.id = ?'
2137-
);
2138-
21392119
$connMock->setDatabasePlatform($orgPlatform);
21402120
}
21412121

0 commit comments

Comments
 (0)