Skip to content

Commit f34ba6a

Browse files
Fix tests
1 parent 7922902 commit f34ba6a

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

tests/Platforms/AbstractMySQLPlatformTestCase.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,4 +630,15 @@ public static function getEnumDeclarationSQLProvider(): array
630630
'multiple values' => [['foo', 'bar1'], "ENUM('foo', 'bar1')"],
631631
];
632632
}
633+
634+
/** @return array<string, array{array<string>, int, string}> */
635+
public static function getEnumDeclarationWithLengthSQLProvider(): array
636+
{
637+
return [
638+
'single value and bigger length' => [['foo'], 42, "ENUM('foo')"],
639+
'single value and lower length' => [['foo'], 1, "ENUM('foo')"],
640+
'multiple values and bigger length' => [['foo', 'bar1'], 42, "ENUM('foo', 'bar1')"],
641+
'multiple values and lower length' => [['foo', 'bar1'], 2, "ENUM('foo', 'bar1')"],
642+
];
643+
}
633644
}

tests/Platforms/OraclePlatformTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,4 +651,15 @@ public static function getEnumDeclarationSQLProvider(): array
651651
'multiple values' => [['foo', 'bar1'], 'VARCHAR2(4)'],
652652
];
653653
}
654+
655+
/** @return array<string, array{array<string>, int, string}> */
656+
public static function getEnumDeclarationWithLengthSQLProvider(): array
657+
{
658+
return [
659+
'single value and bigger length' => [['foo'], 42, 'VARCHAR2(42)'],
660+
'single value and lower length' => [['foo'], 1, 'VARCHAR2(3)'],
661+
'multiple values and bigger length' => [['foo', 'bar1'], 42, 'VARCHAR2(42)'],
662+
'multiple values and lower length' => [['foo', 'bar1'], 2, 'VARCHAR2(4)'],
663+
];
664+
}
654665
}

tests/Platforms/SQLServerPlatformTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,4 +1225,15 @@ public static function getEnumDeclarationSQLProvider(): array
12251225
'multiple values' => [['foo', 'bar1'], 'NVARCHAR(4)'],
12261226
];
12271227
}
1228+
1229+
/** @return array<string, array{array<string>, int, string}> */
1230+
public static function getEnumDeclarationWithLengthSQLProvider(): array
1231+
{
1232+
return [
1233+
'single value and bigger length' => [['foo'], 42, 'NVARCHAR(42)'],
1234+
'single value and lower length' => [['foo'], 1, 'NVARCHAR(3)'],
1235+
'multiple values and bigger length' => [['foo', 'bar1'], 42, 'NVARCHAR(42)'],
1236+
'multiple values and lower length' => [['foo', 'bar1'], 2, 'NVARCHAR(4)'],
1237+
];
1238+
}
12281239
}

0 commit comments

Comments
 (0)