Esempio n. 1
0
 public function testDeveGerarOhtmlDoLoteQuandoPossuirGuias()
 {
     $smarty = $this->getMock('\\Smarty');
     $smarty->expects($this->at(0))->method('assign')->with('guiaViaInfo');
     $smarty->expects($this->at(1))->method('assign')->with('barcode');
     $smarty->expects($this->at(2))->method('assign')->with('guia');
     $smarty->expects($this->at(3))->method('fetch')->with('gnre.tpl')->will($this->returnValue('<html></html>'));
     $smartyFactory = $this->getMock('\\Sped\\Gnre\\Render\\SmartyFactory');
     $smartyFactory->expects($this->once())->method('create')->will($this->returnValue($smarty));
     $html = new Html();
     $html->setSmartyFactory($smartyFactory);
     $lote = new \Sped\Gnre\Sefaz\Lote();
     $lote->addGuia(new \Sped\Gnre\Sefaz\Guia());
     $html->create($lote);
     $this->assertNotEmpty($html->getHtml());
 }