2020use Doctrine \DBAL \Schema \Table ;
2121use Doctrine \DBAL \TransactionIsolationLevel ;
2222use Doctrine \DBAL \Types \Types ;
23+ use PHPUnit \Framework \Attributes \DataProvider ;
2324
2425use function array_shift ;
2526
@@ -622,6 +623,13 @@ protected function createComparator(): Comparator
622623 );
623624 }
624625
626+ /** @param array<string> $values */
627+ #[DataProvider('getEnumDeclarationExceptionWithLengthSQLProvider ' )]
628+ public function testGetEnumDeclarationExceptionWithLengthSQL (array $ values , int $ length ): void
629+ {
630+ self ::markTestSkipped ('There is no exception thrown on MySQL. ' );
631+ }
632+
625633 /** @return array<string, array{array<string>, string}> */
626634 public static function getEnumDeclarationSQLProvider (): array
627635 {
@@ -630,4 +638,15 @@ public static function getEnumDeclarationSQLProvider(): array
630638 'multiple values ' => [['foo ' , 'bar1 ' ], "ENUM('foo', 'bar1') " ],
631639 ];
632640 }
641+
642+ /** @return array<string, array{array<string>, int, string}> */
643+ public static function getEnumDeclarationWithLengthSQLProvider (): array
644+ {
645+ return [
646+ 'single value and bigger length ' => [['foo ' ], 42 , "ENUM('foo') " ],
647+ 'single value and lower length ' => [['foo ' ], 1 , "ENUM('foo') " ],
648+ 'multiple values and bigger length ' => [['foo ' , 'bar1 ' ], 42 , "ENUM('foo', 'bar1') " ],
649+ 'multiple values and lower length ' => [['foo ' , 'bar1 ' ], 2 , "ENUM('foo', 'bar1') " ],
650+ ];
651+ }
633652}
0 commit comments