*
* @param string|array $paths A path or an array of paths where to look for templates
*/
- public function __construct($paths)
+ public function __construct($paths = array())
{
- $this->setPaths($paths);
+ if ($paths) {
+ $this->setPaths($paths);
+ }
}
/**
$this->assertEquals("named path (final)\n", $loader->getSource('@named/index.html'));
}
+ public function testEmptyConstructor()
+ {
+ $loader = new Twig_Loader_Filesystem();
+ $this->assertEquals(array(), $loader->getPaths());
+ }
+
public function testGetNamespaces()
{
$loader = new Twig_Loader_Filesystem(sys_get_temp_dir());