From: Fabien Potencier Date: Tue, 14 Dec 2010 13:28:47 +0000 (+0100) Subject: added some unit tests for the filesystem loader X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=090270a5090112b0b04c595f16b507679abd151e;p=web%2Fkonrad%2Ftwig.git added some unit tests for the filesystem loader --- 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'), + ); + } +}