Skip to content

Commit

Permalink
alterado nome dos mocks para remover phpunit warning
Browse files Browse the repository at this point in the history
  • Loading branch information
marabesi committed Apr 18, 2017
1 parent 5bd7a59 commit cada4a2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions testes/Render/HtmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testDeveRetornarNullSeNaoForCriadoOhtmlDaGuia() {

public function testNaoDeveGerarOhtmlDoLoteQuandoOloteEvazio() {
$html = new Html();
$mkcLote = $this->getMock('\Sped\Gnre\Sefaz\Lote');
$mkcLote = $this->createMock('\Sped\Gnre\Sefaz\Lote');
$mkcLote->expects($this->once())
->method('getGuias');
$mkcLote->expects($this->never())
Expand All @@ -46,7 +46,7 @@ public function testNaoDeveGerarOhtmlDoLoteQuandoOloteEvazio() {
}

public function testDeveGerarOhtmlDoLoteQuandoPossuirGuias() {
$smarty = $this->getMock('\Smarty');
$smarty = $this->createMock('\Smarty');
$smarty->expects($this->at(0))
->method('assign')
->with('guiaViaInfo');
Expand All @@ -60,7 +60,7 @@ public function testDeveGerarOhtmlDoLoteQuandoPossuirGuias() {
->method('fetch')
->will($this->returnValue('<html></html>'));

$smartyFactory = $this->getMock('\Sped\Gnre\Render\SmartyFactory');
$smartyFactory = $this->createMock('\Sped\Gnre\Render\SmartyFactory');
$smartyFactory->expects($this->once())
->method('create')
->will($this->returnValue($smarty));
Expand Down
6 changes: 3 additions & 3 deletions testes/Render/PdfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ public static function setUpBeforeClass() {
}

public function testDeveCriarOpdfApartirDoHtml() {
$dom = $this->getMock('\DOMPDF');
$dom = $this->createMock('\DOMPDF');
$dom->expects($this->once())
->method('render');

$html = $this->getMock('\Sped\Gnre\Render\Html');
$html = $this->createMock('\Sped\Gnre\Render\Html');
$html->expects($this->once())
->method('getHtml')
->will($this->returnValue('<html><p>Guia GNRE</p></html>'));


$pdf = $this->getMock('\Sped\Gnre\Render\Pdf', array('getDomPdf'));
$pdf = $this->createMock('\Sped\Gnre\Render\Pdf', array('getDomPdf'));
$pdf->expects($this->once())
->method('getDomPdf')
->will($this->returnValue($dom));
Expand Down
12 changes: 6 additions & 6 deletions testes/Sefaz/SendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class SendTest extends \PHPUnit_Framework_TestCase {
private $objetoSefaz;

public function setUp() {
$this->setup = $this->getMock('\Sped\Gnre\Configuration\Setup');
$this->objetoSefaz = $this->getMock('\Sped\Gnre\Sefaz\ObjetoSefaz');
$this->setup = $this->createMock('\Sped\Gnre\Configuration\Setup');
$this->objetoSefaz = $this->createMock('\Sped\Gnre\Sefaz\ObjetoSefaz');
}

/**
Expand All @@ -27,14 +27,14 @@ public function testDeveLancarExcecaoAoNaoSetarUmaConnectionFactoryParaSerUsada(
}

public function testDeveSetarUmaConnectionFactoryParaSerUsada() {
$connectionFactory = $this->getMock('\Sped\Gnre\Webservice\ConnectionFactory');
$connectionFactory = $this->createMock('\Sped\Gnre\Webservice\ConnectionFactory');

$send = new Send($this->setup);
$this->assertInstanceOf('\Sped\Gnre\Sefaz\Send', $send->setConnectionFactory($connectionFactory));
}

public function testDeveRetornarUmaConnectionFactory() {
$connectionFactory = $this->getMock('\Sped\Gnre\Webservice\ConnectionFactory');
$connectionFactory = $this->createMock('\Sped\Gnre\Webservice\ConnectionFactory');

$send = new Send($this->setup);
$send->setConnectionFactory($connectionFactory);
Expand All @@ -50,7 +50,7 @@ public function testDeveRealizarAconexaoComAsefaz() {
->method('doRequest')
->will($this->returnValue(true));

$connectionFactory = $this->getMock('\Sped\Gnre\Webservice\ConnectionFactory');
$connectionFactory = $this->createMock('\Sped\Gnre\Webservice\ConnectionFactory');
$connectionFactory->expects($this->once())
->method('createConnection')
->will($this->returnValue($connection));
Expand All @@ -69,7 +69,7 @@ public function testDeveExibirDebug()
->method('doRequest')
->will($this->returnValue(true));

$connectionFactory = $this->getMock('\Sped\Gnre\Webservice\ConnectionFactory');
$connectionFactory = $this->createMock('\Sped\Gnre\Webservice\ConnectionFactory');
$connectionFactory->expects($this->once())
->method('createConnection')
->will($this->returnValue($connection));
Expand Down

0 comments on commit cada4a2

Please sign in to comment.