@@ -17,47 +17,54 @@ final class ScalarTest extends Base
17
17
*/
18
18
public function providerTemplater ()
19
19
{
20
- $ data = ['str"ing ' , 1 , null , '3.5 ' , 2.5 ];
20
+ $ data = ['str"ing ' , 1 , null , '3.5 ' , 2.5 , ' 28f7dc7206a1 ' ];
21
21
return [
22
22
'escape ' => [
23
- 'INSERT INTO `table` VALUES (?, ?scalar, ?, ?string, ?) ' ,
23
+ 'INSERT INTO `table` VALUES (?, ?scalar, ?, ?string, ?, ? ) ' ,
24
24
$ data ,
25
- 'INSERT INTO `table` VALUES ("str\"ing", 1, NULL, "3.5", 2.5) ' ,
25
+ 'INSERT INTO `table` VALUES ("str\"ing", 1, NULL, "3.5", 2.5, "28f7dc7206a1" ) ' ,
26
26
],
27
27
'null ' => [
28
- 'INSERT INTO `table` VALUES (?null, ?null, ?null, ?null, ?null) ' ,
28
+ 'INSERT INTO `table` VALUES (?null, ?null, ?null, ?null, ?null, ?null ) ' ,
29
29
$ data ,
30
- 'INSERT INTO `table` VALUES ("str\"ing", 1, NULL, "3.5", 2.5) ' ,
30
+ 'INSERT INTO `table` VALUES ("str\"ing", 1, NULL, "3.5", 2.5, "28f7dc7206a1" ) ' ,
31
31
],
32
32
'int ' => [
33
- 'INSERT INTO `table` VALUES (?i, ?i, ?i, ?i, ?i) ' ,
33
+ 'INSERT INTO `table` VALUES (?i, ?i, ?i, ?i, ?i, ?i ) ' ,
34
34
$ data ,
35
- 'INSERT INTO `table` VALUES (0, 1, NULL, 3, 2) ' ,
35
+ 'INSERT INTO `table` VALUES (0, 1, NULL, 3, 2, 28 ) ' ,
36
36
],
37
37
'int-null ' => [
38
- 'INSERT INTO `table` VALUES (?in, ?in, ?in, ?in, ?in) ' ,
38
+ 'INSERT INTO `table` VALUES (?in, ?in, ?in, ?in, ?in, ?in ) ' ,
39
39
$ data ,
40
- 'INSERT INTO `table` VALUES (0, 1, NULL, 3, 2) ' ,
40
+ 'INSERT INTO `table` VALUES (0, 1, NULL, 3, 2, 28 ) ' ,
41
41
],
42
42
'float ' => [
43
- 'INSERT INTO `table` VALUES (?f, ?f, ?f, ?f, ?f) ' ,
43
+ 'INSERT INTO `table` VALUES (?f, ?f, ?f, ?f, ?f, ?f ) ' ,
44
44
$ data ,
45
- 'INSERT INTO `table` VALUES (0, 1, NULL, 3.5, 2.5) ' ,
45
+ 'INSERT INTO `table` VALUES (0, 1, NULL, 3.5, 2.5, 28 ) ' ,
46
46
],
47
47
'string ' => [
48
- 'INSERT INTO `table` VALUES (?string, ?string, ?string, ?string, ?string) ' ,
48
+ 'INSERT INTO `table` VALUES (?string, ?string, ?string, ?string, ?string, ?string ) ' ,
49
49
$ data ,
50
- 'INSERT INTO `table` VALUES ("str\"ing", "1", NULL, "3.5", "2.5") ' ,
50
+ 'INSERT INTO `table` VALUES ("str\"ing", "1", NULL, "3.5", "2.5", "28f7dc7206a1" ) ' ,
51
51
],
52
52
'string-null ' => [
53
- 'INSERT INTO `table` VALUES (?string-null, ?string-null, ?string-null, ?string-null, ?string-null) ' ,
53
+ 'INSERT INTO `table` '
54
+ . ' VALUES (?string-null, ?string-null, ?string-null, ?string-null, ?string-null, ?string-null) ' ,
54
55
$ data ,
55
- 'INSERT INTO `table` VALUES ("str\"ing", "1", NULL, "3.5", "2.5") ' ,
56
+ 'INSERT INTO `table` VALUES ("str\"ing", "1", NULL, "3.5", "2.5", "28f7dc7206a1" ) ' ,
56
57
],
57
58
'full ' => [
58
- 'INSERT INTO `table` VALUES (?string, ?scalar-int, ?scalar-null, ?scalar-int-null, ?scalar-float) ' ,
59
+ 'INSERT INTO `table` '
60
+ . ' VALUES (?string, ?scalar-int, ?scalar-null, ?scalar-int, ?scalar-float, ?scalar-hex) ' ,
59
61
$ data ,
60
- 'INSERT INTO `table` VALUES ("str\"ing", 1, NULL, 3, 2.5) ' ,
62
+ 'INSERT INTO `table` VALUES ("str\"ing", 1, NULL, 3, 2.5, x \'28f7dc7206a1 \') ' ,
63
+ ],
64
+ 'hex ' => [
65
+ 'INSERT INTO `table` VALUES (?h, ?h, ?h, ?hn, ?hex, ?scalar-hex) ' ,
66
+ $ data ,
67
+ "INSERT INTO `table` VALUES (x'str \\\"ing', x'1', NULL, x'3.5', x'2.5', x'28f7dc7206a1') " ,
61
68
],
62
69
];
63
70
}
0 commit comments