瀏覽代碼

FilesystemLoader: removed all temp folder logic from testConstructorWithProtocol test.

Conflicts:
	test/Mustache/Test/Loader/FilesystemLoaderTest.php
mlebrun 12 年之前
父節點
當前提交
339c94b2e1
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      test/Mustache/Test/Loader/FilesystemLoaderTest.php

+ 9 - 0
test/Mustache/Test/Loader/FilesystemLoaderTest.php

@@ -29,6 +29,15 @@ class Mustache_Test_Loader_FilesystemLoaderTest extends PHPUnit_Framework_TestCa
         $this->assertEquals('one contents', $loader->load('one'));
     }
 
+    public function testConstructorWithProtocol()
+    {
+        $baseDir = realpath(dirname(__FILE__).'/../../../fixtures/templates');
+
+        $loader = new Mustache_Loader_FilesystemLoader('file://' . $baseDir, array('extension' => '.ms'));
+        $this->assertEquals('alpha contents', $loader->load('alpha'));
+        $this->assertEquals('beta contents', $loader->load('beta.ms'));
+    }
+
     public function testLoadTemplates()
     {
         $baseDir = realpath(dirname(__FILE__).'/../../../fixtures/templates');