Permalink
Browse files

fixed merge

  • Loading branch information...
1 parent 33a0372 commit 8906ba3cf8b93ef778f907536176918c5ed4573c @fabpot fabpot committed Aug 4, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 Tests/Logger/DbalLoggerTest.php
@@ -45,4 +45,27 @@ public function getLogFixtures()
array('SQL', array('foo' => 'bar'), array('foo' => 'bar'))
);
}
+
+ public function testLogNonUtf8()
+ {
+ $logger = $this->getMock('Symfony\\Component\\HttpKernel\\Log\\LoggerInterface');
+
+ $dbalLogger = $this
+ ->getMockBuilder('Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger')
+ ->setConstructorArgs(array($logger, null))
+ ->setMethods(array('log'))
+ ->getMock()
+ ;
+
+ $dbalLogger
+ ->expects($this->once())
+ ->method('log')
+ ->with('SQL ({"utf8":"foo","nonutf8":null})')
+ ;
+
+ $dbalLogger->startQuery('SQL', array(
+ 'utf8' => 'foo',
+ 'nonutf8' => "\x7F\xFF"
+ ));
+ }
}

0 comments on commit 8906ba3

Please sign in to comment.