@@ -13,7 +13,50 @@ class TypemixMysql
1313 public function typemixMysqli (mysqli $ mysqli )
1414 {
1515 $ result = mysqli_query ($ mysqli , 'SELECT * FROM typemix ' );
16- assertType ('mysqli_result< ' . self ::MYSQL_DATATYPES . '> ' , $ result );
16+
17+ foreach ($ result as $ value ) {
18+ assertType ('int<0, 4294967295> ' , $ value ['pid ' ]);
19+ assertType ('string ' , $ value ['c_char5 ' ]);
20+ assertType ('string ' , $ value ['c_varchar255 ' ]);
21+ assertType ('string|null ' , $ value ['c_varchar25 ' ]);
22+ assertType ('string ' , $ value ['c_varbinary255 ' ]);
23+ assertType ('string|null ' , $ value ['c_varbinary25 ' ]);
24+ assertType ('string|null ' , $ value ['c_date ' ]);
25+ assertType ('string|null ' , $ value ['c_time ' ]);
26+ assertType ('string|null ' , $ value ['c_datetime ' ]);
27+ assertType ('string|null ' , $ value ['c_timestamp ' ]);
28+ assertType ('int<0, 2155>|null ' , $ value ['c_year ' ]);
29+ assertType ('string|null ' , $ value ['c_tiny_text ' ]);
30+ assertType ('string|null ' , $ value ['c_medium_text ' ]);
31+ assertType ('string|null ' , $ value ['c_text ' ]);
32+ assertType ('string|null ' , $ value ['c_long_text ' ]);
33+ assertType ('string ' , $ value ['c_enum ' ]);
34+ assertType ('string ' , $ value ['c_set ' ]);
35+ assertType ('int|null ' , $ value ['c_bit ' ]);
36+ assertType ('int<-2147483648, 2147483647> ' , $ value ['c_int ' ]);
37+ assertType ('int<-128, 127> ' , $ value ['c_tinyint ' ]);
38+ assertType ('int<-128, 127>|null ' , $ value ['c_nullable_tinyint ' ]);
39+ assertType ('int<-32768, 32767> ' , $ value ['c_smallint ' ]);
40+ assertType ('int<-8388608, 8388607> ' , $ value ['c_mediumint ' ]);
41+ assertType ('int ' , $ value ['c_bigint ' ]);
42+ assertType ('float ' , $ value ['c_double ' ]);
43+ assertType ('float ' , $ value ['c_real ' ]);
44+ assertType ('float ' , $ value ['c_float ' ]);
45+ assertType ('int<-128, 127> ' , $ value ['c_boolean ' ]);
46+ assertType ('string ' , $ value ['c_blob ' ]);
47+ assertType ('string ' , $ value ['c_tinyblob ' ]);
48+ assertType ('string ' , $ value ['c_mediumblog ' ]);
49+ assertType ('string ' , $ value ['c_longblob ' ]);
50+ assertType ('int<0, 255> ' , $ value ['c_unsigned_tinyint ' ]);
51+ assertType ('int<0, 4294967295> ' , $ value ['c_unsigned_int ' ]);
52+ assertType ('int<0, 65535> ' , $ value ['c_unsigned_smallint ' ]);
53+ assertType ('int<0, 16777215> ' , $ value ['c_unsigned_mediumint ' ]);
54+ assertType ('int<0, max> ' , $ value ['c_unsigned_bigint ' ]);
55+ assertType ('string|null ' , $ value ['c_json ' ]);
56+ assertType ('string ' , $ value ['c_json_not_null ' ]);
57+ assertType ('numeric-string|null ' , $ value ['c_decimal ' ]);
58+ assertType ('numeric-string ' , $ value ['c_decimal_not_null ' ]);
59+ }
1760 }
1861
1962 public function typemixPdoMysql (PDO $ pdo )
0 commit comments