Skip to content

Commit 0c230a5

Browse files
authored
Merge pull request #5752 from morozov/issues/5751
Rename SQL Server platform unit test
2 parents 70b0b82 + 3f229cf commit 0c230a5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/Platforms/SQLServerPlatformTestCase.php renamed to tests/Platforms/SQLServerPlatformTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use InvalidArgumentException;
1919

2020
/** @extends AbstractPlatformTestCase<SQLServerPlatform> */
21-
class SQLServerPlatformTestCase extends AbstractPlatformTestCase
21+
class SQLServerPlatformTest extends AbstractPlatformTestCase
2222
{
2323
public function createPlatform(): AbstractPlatform
2424
{
@@ -80,7 +80,7 @@ public function testGeneratesSqlSnippets(): void
8080
self::assertEquals('"', $this->platform->getIdentifierQuoteCharacter());
8181

8282
self::assertEquals(
83-
'(column1 + column2 + column3)',
83+
'CONCAT(column1, column2, column3)',
8484
$this->platform->getConcatExpression('column1', 'column2', 'column3'),
8585
);
8686
}
@@ -659,6 +659,7 @@ protected function getQuotedColumnInForeignKeySQL(): array
659659
return [
660660
'CREATE TABLE [quoted] ([create] NVARCHAR(255) NOT NULL, '
661661
. 'foo NVARCHAR(255) NOT NULL, [bar] NVARCHAR(255) NOT NULL)',
662+
'CREATE INDEX IDX_22660D028FD6E0FB8C736521D79164E3 ON [quoted] ([create], foo, [bar])',
662663
'ALTER TABLE [quoted] ADD CONSTRAINT FK_WITH_RESERVED_KEYWORD'
663664
. ' FOREIGN KEY ([create], foo, [bar]) REFERENCES [foreign] ([create], bar, [foo-bar])',
664665
'ALTER TABLE [quoted] ADD CONSTRAINT FK_WITH_NON_RESERVED_KEYWORD'
@@ -1607,6 +1608,11 @@ protected function getGeneratesAlterTableRenameIndexUsedByForeignKeySQL(): array
16071608
return ["EXEC sp_rename N'mytable.idx_foo', N'idx_foo_renamed', N'INDEX'"];
16081609
}
16091610

1611+
protected function getLimitOffsetCastToIntExpectedQuery(): string
1612+
{
1613+
return 'SELECT * FROM user ORDER BY (SELECT 0) OFFSET 2 ROWS FETCH NEXT 1 ROWS ONLY';
1614+
}
1615+
16101616
public function testModifyLimitQueryWithTopNSubQueryWithOrderBy(): void
16111617
{
16121618
$query = 'SELECT * FROM test t WHERE t.id = (SELECT TOP 1 t2.id FROM test t2 ORDER BY t2.data DESC)';

0 commit comments

Comments
 (0)