Smarty 3.1.22 code change

- improvement use is_file() checks to avoid errors suppressed by @ which could still cause problems (https://github.com/smarty-php/smarty/issues/24)
This commit is contained in:
Uwe Tews
2015-05-05 01:03:12 +02:00
parent 8056c27602
commit 81aae13e55

View File

@@ -62,10 +62,10 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty
$this->smarty->clearCompiledTemplate('default.tpl');
$this->smarty->fetch('default.tpl');
$this->assertEquals(Smarty::$_IS_WINDOWS ? 5 : 4, count($this->_errors));
$this->assertEquals(Smarty::$_IS_WINDOWS ? 2 : 1, count($this->_errors));
@filemtime('ckxladanwijicajscaslyxck');
$this->assertEquals(Smarty::$_IS_WINDOWS ? 6 : 5, count($this->_errors));
$this->assertEquals(Smarty::$_IS_WINDOWS ? 3 : 2, count($this->_errors));
restore_error_handler();
}
@@ -110,11 +110,11 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty
$this->smarty->clearCompiledTemplate('default.tpl');
$this->smarty->fetch('default.tpl');
$this->assertEquals(Smarty::$_IS_WINDOWS ? 7 : 5, count($this->_errors));
$this->assertEquals(Smarty::$_IS_WINDOWS ? 2 : 0, count($this->_errors));
@filemtime('ckxladanwijicajscaslyxck');
$error = array(__FILE__ . ' line ' . (__LINE__ - 1));
$this->assertEquals(Smarty::$_IS_WINDOWS ? 8 : 6, count($this->_errors));
$this->assertEquals(Smarty::$_IS_WINDOWS ? 3 : 1, count($this->_errors));
restore_error_handler();
}