Skip to content

Commit

Permalink
fixed merge
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Aug 4, 2012
1 parent 33a0372 commit 8906ba3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Tests/Logger/DbalLoggerTest.php
Expand Up @@ -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.