Skip to content

Commit

Permalink
improve unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fagundes committed Apr 2, 2016
1 parent fbffaee commit d5c89a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/View/Model/Html2PdfModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ protected function setUp()

$this->model->setFilename('myNewDoc.pdf');
$this->model->setDest('D');
$this->model->setHtml2PdfOptions([
'orientation' => 'L',
'format' => 'A3',
]);
}

public function testAllowsEmptyConstructor()
Expand All @@ -40,6 +44,7 @@ public function testAllowsEmptyConstructor()
public function testIsTerminateModelAsDefault()
{
$model = new Html2PdfModel();
$this->assertTrue($model->terminate());
}

public function testDefaultAttributeValue()
Expand All @@ -49,11 +54,13 @@ public function testDefaultAttributeValue()
$this->assertEquals(true, $model->terminate());
$this->assertStringEndsWith('.pdf', $model->getFilename());
$this->assertEquals('I', $model->getDest());
$this->assertEmpty($model->getHtml2PdfOptions());
}

public function testGettersMustReturnTheAttributeValue()
{
$this->assertAttributeEquals($this->model->getFilename(), 'filename', $this->model);
$this->assertAttributeEquals($this->model->getDest(), 'dest', $this->model);
$this->assertAttributeEquals($this->model->getHtml2PdfOptions(), 'html2PdfOptions', $this->model);
}
}

0 comments on commit d5c89a2

Please sign in to comment.