mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
remove php 5.2 compatibility for filesystemhelper
This commit is contained in:
@@ -39,6 +39,11 @@
|
||||
"Twig_" : "lib/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-0" : {
|
||||
"Twig_Tests_" : "test/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once dirname(dirname(__FILE__)).'/FilesystemHelper.php';
|
||||
|
||||
class Twig_Tests_Cache_FilesystemTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
private $classname;
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/FilesystemHelper.php';
|
||||
|
||||
class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testAutoescapeOption()
|
||||
|
||||
@@ -13,12 +13,8 @@ class Twig_Tests_FilesystemHelper
|
||||
{
|
||||
public static function removeDir($dir)
|
||||
{
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, PHP_VERSION_ID < 50300 ? 0 : FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST);
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST);
|
||||
foreach ($iterator as $filename => $fileInfo) {
|
||||
if ($iterator->isDot()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($fileInfo->isDir()) {
|
||||
rmdir($filename);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user