コード例 #1
0
 function testLocateAll()
 {
     $locator = new lmbFileLocator($mock = new MockFileLocations());
     $mock->expectOnce('getLocations');
     $mock->setReturnValue('getLocations', array(dirname(__FILE__) . '/design/', dirname(__FILE__) . '/design/_en/'));
     $all_files = $locator->locateAll('*.html');
     sort($all_files);
     $this->assertEqual(lmbFs::normalizePath($all_files[0]), lmbFs::normalizePath(dirname(__FILE__) . '/design/test1.html'));
     $this->assertEqual(lmbFs::normalizePath($all_files[1]), lmbFs::normalizePath(dirname(__FILE__) . '/design/_en/test1.html'));
 }
コード例 #2
0
 function testNullInFileNameFixe()
 {
     $locator = new lmbFileLocator($mock = new MockFileLocations());
     $this->assertTrue(false === $locator->locate(dirname(__FILE__) . '/design/_en/test1.html' . " Hello Bug!"));
 }