File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,37 @@ public function testLogNonUtf8()
73
73
));
74
74
}
75
75
76
+ public function testLogNonUtf8Array ()
77
+ {
78
+ $ logger = $ this ->getMock ('Psr \\Log \\LoggerInterface ' );
79
+
80
+ $ dbalLogger = $ this
81
+ ->getMockBuilder ('Symfony \\Bridge \\Doctrine \\Logger \\DbalLogger ' )
82
+ ->setConstructorArgs (array ($ logger , null ))
83
+ ->setMethods (array ('log ' ))
84
+ ->getMock ()
85
+ ;
86
+
87
+ $ dbalLogger
88
+ ->expects ($ this ->once ())
89
+ ->method ('log ' )
90
+ ->with ('SQL ' , array (
91
+ 'utf8 ' => 'foo ' ,
92
+ array (
93
+ 'nonutf8 ' => DbalLogger::BINARY_DATA_VALUE ,
94
+ )
95
+ )
96
+ )
97
+ ;
98
+
99
+ $ dbalLogger ->startQuery ('SQL ' , array (
100
+ 'utf8 ' => 'foo ' ,
101
+ array (
102
+ 'nonutf8 ' => "\x7F\xFF" ,
103
+ )
104
+ ));
105
+ }
106
+
76
107
public function testLogLongString ()
77
108
{
78
109
$ logger = $ this ->getMock ('Symfony \\Component \\HttpKernel \\Log \\LoggerInterface ' );
You can’t perform that action at this time.
0 commit comments