@@ -57,9 +57,47 @@ public function typemixMysqli(mysqli $mysqli)
5757 $ result = mysqli_query ($ mysqli , 'SELECT * FROM typemix ' );
5858
5959 foreach ($ result as $ value ) {
60- foreach (self ::MYSQL_DATATYPES as $ name => $ typeSpec ) {
61- assertType ($ typeSpec , $ value [$ name ]);
62- }
60+ assertType ('int<0, 4294967295> ' , $ value ['pid ' ]);
61+ assertType ('string ' , $ value ['c_char5 ' ]);
62+ assertType ('string ' , $ value ['c_varchar255 ' ]);
63+ assertType ('string|null ' , $ value ['c_varchar25 ' ]);
64+ assertType ('string ' , $ value ['c_varbinary255 ' ]);
65+ assertType ('string|null ' , $ value ['c_varbinary25 ' ]);
66+ assertType ('string|null ' , $ value ['c_date ' ]);
67+ assertType ('string|null ' , $ value ['c_time ' ]);
68+ assertType ('string|null ' , $ value ['c_datetime ' ]);
69+ assertType ('string|null ' , $ value ['c_timestamp ' ]);
70+ assertType ('int<0, 2155>|null ' , $ value ['c_year ' ]);
71+ assertType ('string|null ' , $ value ['c_tiny_text ' ]);
72+ assertType ('string|null ' , $ value ['c_medium_text ' ]);
73+ assertType ('string|null ' , $ value ['c_text ' ]);
74+ assertType ('string|null ' , $ value ['c_long_text ' ]);
75+ assertType ('string ' , $ value ['c_enum ' ]);
76+ assertType ('string ' , $ value ['c_set ' ]);
77+ assertType ('int|null ' , $ value ['c_bit ' ]);
78+ assertType ('int<-2147483648, 2147483647> ' , $ value ['c_int ' ]);
79+ assertType ('int<-128, 127> ' , $ value ['c_tinyint ' ]);
80+ assertType ('int<-128, 127>|null ' , $ value ['c_nullable_tinyint ' ]);
81+ assertType ('int<-32768, 32767> ' , $ value ['c_smallint ' ]);
82+ assertType ('int<-8388608, 8388607> ' , $ value ['c_mediumint ' ]);
83+ assertType ('int ' , $ value ['c_bigint ' ]);
84+ assertType ('float ' , $ value ['c_double ' ]);
85+ assertType ('float ' , $ value ['c_real ' ]);
86+ assertType ('float ' , $ value ['c_float ' ]);
87+ assertType ('int<-128, 127> ' , $ value ['c_boolean ' ]);
88+ assertType ('string ' , $ value ['c_blob ' ]);
89+ assertType ('string ' , $ value ['c_tinyblob ' ]);
90+ assertType ('string ' , $ value ['c_mediumblog ' ]);
91+ assertType ('string ' , $ value ['c_longblob ' ]);
92+ assertType ('int<0, 255> ' , $ value ['c_unsigned_tinyint ' ]);
93+ assertType ('int<0, 4294967295> ' , $ value ['c_unsigned_int ' ]);
94+ assertType ('int<0, 65535> ' , $ value ['c_unsigned_smallint ' ]);
95+ assertType ('int<0, 16777215> ' , $ value ['c_unsigned_mediumint ' ]);
96+ assertType ('int<0, max> ' , $ value ['c_unsigned_bigint ' ]);
97+ assertType ('string|null ' , $ value ['c_json ' ]);
98+ assertType ('string ' , $ value ['c_json_not_null ' ]);
99+ assertType ('numeric-string|null ' , $ value ['c_decimal ' ]);
100+ assertType ('numeric-string ' , $ value ['c_decimal_not_null ' ]);
63101 }
64102 }
65103
0 commit comments