Skip to content

Commit 2523651

Browse files
Fix tests
1 parent 7922902 commit 2523651

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

tests/Platforms/AbstractMySQLPlatformTestCase.php

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

tests/Platforms/OraclePlatformTest.php

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

tests/Platforms/SQLServerPlatformTest.php

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

0 commit comments

Comments
 (0)