From 090270a5090112b0b04c595f16b507679abd151e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 14 Dec 2010 14:28:47 +0100 Subject: [PATCH] added some unit tests for the filesystem loader --- test/Twig/Tests/Loader/Filesystem.php | 39 +++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) create mode 100644 test/Twig/Tests/Loader/Filesystem.php diff --git a/test/Twig/Tests/Loader/Filesystem.php b/test/Twig/Tests/Loader/Filesystem.php new file mode 100644 index 0000000..caf0d68 --- /dev/null +++ b/test/Twig/Tests/Loader/Filesystem.php @@ -0,0 +1,39 @@ +getCacheKey($template); + } + + public function getSecurityTests() + { + return array( + array('..\\AutoloaderTest.php'), + array('../AutoloaderTest.php'), + array('./../AutoloaderTest.php'), + array('.\\..\\AutoloaderTest.php'), + array('././././././../AutoloaderTest.php'), + array('.\\./.\\./.\\./../AutoloaderTest.php'), + array('foo/../../AutoloaderTest.php'), + array('foo\\..\\..\\AutoloaderTest.php'), + array('foo/../bar/../../AutoloaderTest.php'), + array('foo/bar/../../../AutoloaderTest.php'), + ); + } +} -- 1.7.2.5