fix test suite
This commit is contained in:
@@ -76,7 +76,7 @@ class Format extends AbstractSmartyPlugin
|
||||
return "";
|
||||
}
|
||||
|
||||
if (!$date instanceof \DateTime) {
|
||||
if (!($date instanceof \DateTime)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user