fixed paths in unit tests.

This commit is contained in:
Kris Arnold 2014-09-15 16:36:05 -05:00
parent aa7e1800a4
commit c3da644617
6 changed files with 18 additions and 18 deletions

View File

@ -1001,4 +1001,4 @@ class Controller extends BaseController
// return null;
// }
}
}

View File

@ -68,11 +68,11 @@ class CombineAssetsTest extends TestCase
public function testCombine()
{
$combiner = new CombineAssets;
$url = $combiner->combine(['assets/css/style1.css', 'assets/css/style2.css'], '/tests/fixtures/Cms/themes/test');
$url = $combiner->combine(['assets/css/style1.css', 'assets/css/style2.css'], '/tests/fixtures/cms/themes/test');
$this->assertNotNull($url);
$this->assertRegExp('/\w+[-]\d+/i', $url); // Must contain hash-number
$url = $combiner->combine(['assets/js/script1.js', 'assets/js/script2.js'], '/tests/fixtures/Cms/themes/test');
$url = $combiner->combine(['assets/js/script1.js', 'assets/js/script2.js'], '/tests/fixtures/cms/themes/test');
$this->assertNotNull($url);
$this->assertRegExp('/\w+[-]\d+/i', $url); // Must contain hash-number
}
@ -174,4 +174,4 @@ class CombineAssetsTest extends TestCase
$this->assertEquals("The combiner file 'xxx' is not found.", $response->getOriginalContent());
}
}
}

View File

@ -20,8 +20,8 @@ class ComponentManagerTest extends TestCase
public function testListComponentDetails()
{
include_once base_path() . '/tests/fixtures/System/plugins/October/Test/Components/Archive.php';
include_once base_path() . '/tests/fixtures/System/plugins/October/Test/Components/Post.php';
include_once base_path() . '/tests/fixtures/system/plugins/october/test/components/Archive.php';
include_once base_path() . '/tests/fixtures/system/plugins/october/test/components/Post.php';
$manager = ComponentManager::instance();
$components = $manager->listComponentDetails();
@ -71,7 +71,7 @@ class ComponentManagerTest extends TestCase
public function testMakeComponent()
{
include_once base_path() . '/tests/fixtures/System/plugins/October/Test/Components/Archive.php';
include_once base_path() . '/tests/fixtures/system/plugins/october/test/components/Archive.php';
$pageObj = $this->spoofPageCode();
@ -90,7 +90,7 @@ class ComponentManagerTest extends TestCase
public function testDefineProperties()
{
include_once base_path() . '/tests/fixtures/System/plugins/October/Test/Components/Archive.php';
include_once base_path() . '/tests/fixtures/system/plugins/october/test/components/Archive.php';
$manager = ComponentManager::instance();
$object = $manager->makeComponent('testArchive');
$details = $object->componentDetails();
@ -113,4 +113,4 @@ class ComponentManagerTest extends TestCase
$pageObj = $parser->source($page, $layout, $controller);
return $pageObj;
}
}
}

View File

@ -299,7 +299,7 @@ ESC;
public function testComponentAliases()
{
include_once base_path() . '/tests/fixtures/System/plugins/October/Test/Components/Archive.php';
include_once base_path() . '/tests/fixtures/system/plugins/october/test/components/Archive.php';
$theme = new Theme();
$theme->load('test');
@ -359,11 +359,11 @@ ESC;
$url = $controller->themeUrl(['assets/css/style1.css', 'assets/css/style2.css']);
$url = substr($url, 0, strpos($url, '-'));
$this->assertEquals('/combine/88634b8fa6f4f6442ce830d38296640a', $url);
$this->assertEquals('/combine/adec0b826d103d671ab88a38b65734d7', $url);
$url = $controller->themeUrl(['assets/js/script1.js', 'assets/js/script2.js']);
$url = substr($url, 0, strpos($url, '-'));
$this->assertEquals('/combine/860afc990164a60a8e90682d04da27ee', $url);
$this->assertEquals('/combine/0b07ee67e15e6985d289c34b67d1a8e2', $url);
}
}

View File

@ -23,7 +23,7 @@ class FileHelperTest extends TestCase
'var2'=>'value 21'
];
$path = base_path().'/tests/fixtures/Cms/filehelper/simple.ini';
$path = base_path().'/tests/fixtures/cms/filehelper/simple.ini';
$this->assertFileExists($path);
$str = FileHelper::formatIniString($data);
@ -43,7 +43,7 @@ class FileHelperTest extends TestCase
'var2'=>'value 21'
];
$path = base_path().'/tests/fixtures/Cms/filehelper/sections.ini';
$path = base_path().'/tests/fixtures/cms/filehelper/sections.ini';
$this->assertFileExists($path);
$str = FileHelper::formatIniString($data);
@ -71,10 +71,10 @@ class FileHelperTest extends TestCase
'var2'=>'value 21'
];
$path = base_path().'/tests/fixtures/Cms/filehelper/subsections.ini';
$path = base_path().'/tests/fixtures/cms/filehelper/subsections.ini';
$this->assertFileExists($path);
$str = FileHelper::formatIniString($data);
$this->assertEquals(file_get_contents($path), $str);
}
}
}

View File

@ -43,7 +43,7 @@ class ThemeTest extends TestCase
$pages = $theme->listPages();
$this->assertInternalType('array', $pages);
$expectedPageNum = $this->countThemePages(base_path().'/tests/fixtures/Cms/themes/test/pages');
$expectedPageNum = $this->countThemePages(base_path().'/tests/fixtures/cms/themes/test/pages');
$this->assertEquals($expectedPageNum, count($pages));
$this->assertInstanceOf('\Cms\Classes\Page', $pages[0]);
@ -79,4 +79,4 @@ class ThemeTest extends TestCase
$this->assertNotNull($activeTheme);
$this->assertEquals('apitest', $activeTheme->getDirName());
}
}
}