Beispiel #1
0
 public function testGenerateFromHtml()
 {
     $internal = $this->getMock('Knp\\Snappy\\GeneratorInterface');
     $internal->expects($this->once())->method('generateFromHtml')->with($this->equalTo('<html>foo</html>'), $this->equalTo('the_output_file'), $this->equalTo(array('foo' => 'bar')), $this->equalTo(true));
     $logger = $this->getMock('Symfony\\Component\\HttpKernel\\Log\\LoggerInterface');
     $logger->expects($this->once())->method('debug')->with($this->equalTo('Generate from HTML (<html>foo</html>) to file (the_output_file).'));
     $generator = new LoggableGenerator($internal, $logger);
     $generator->generateFromHtml('<html>foo</html>', 'the_output_file', array('foo' => 'bar'), true);
 }