fix test suite

This commit is contained in:
Manuel Raynaud
2013-10-25 11:21:39 +02:00
parent 0d8c4f97a1
commit 7ca339492f
2 changed files with 4 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ class Format extends AbstractSmartyPlugin
return "";
}
if (!$date instanceof \DateTime) {
if (!($date instanceof \DateTime)) {
return "";
}

View File

@@ -155,7 +155,6 @@ class FormatTest extends \PHPUnit_Framework_TestCase
* test formatDate without mandatory parameters
*
* @covers ::formatDate
* @expectedException \Thelia\Core\Template\Smarty\Exception\SmartyPluginException
*/
public function testFormatDateWithoutDate()
{
@@ -165,20 +164,21 @@ class FormatTest extends \PHPUnit_Framework_TestCase
$render = $formatClass->formatDate(array());
$this->assertEquals($dateTime->format("Y-m-d H:i:s"), $render);
$this->assertEmpty($render);
}
/**
* test formatNumber without mandatory parameters
*
* @covers ::formatNumber
* @expectedException \Thelia\Core\Template\Smarty\Exception\SmartyPluginException
*/
public function testFormatNumberWithoutParams()
{
$formatClass = new Format($this->request);
$render = $formatClass->formatNumber(array());
$this->assertEmpty($render);
}
/**