Skip to content

Commit

Permalink
fix html writer test
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Oct 11, 2014
1 parent 6a7e484 commit e79e328
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/PSX/Data/Writer/HtmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,25 @@ public function testSetExistingTemplateFile()

public function testIsContentTypeSupported()
{
$writer = new Html();
$template = $this->getMock('PSX\TemplateInterface');
$router = $this->getMockBuilder('PSX\Loader\ReverseRouter')
->disableOriginalConstructor()
->getMock();

$writer = new Html($template, $router);

$this->assertTrue($writer->isContentTypeSupported('text/html'));
$this->assertFalse($writer->isContentTypeSupported('application/xml'));
}

public function testGetContentType()
{
$writer = new Html();
$template = $this->getMock('PSX\TemplateInterface');
$router = $this->getMockBuilder('PSX\Loader\ReverseRouter')
->disableOriginalConstructor()
->getMock();

$writer = new Html($template, $router);

$this->assertEquals('text/html', $writer->getContentType());
}
Expand Down

0 comments on commit e79e328

Please sign in to comment.