Fixing the failure of some tests if the framework dir is named something other than 'framework' (which is a legitimate option)

This commit is contained in:
Nightjar 2014-08-31 16:37:08 +01:00 committed by nightjar
parent 98ab540aba
commit e4b563e596
2 changed files with 13 additions and 7 deletions

View File

@ -405,7 +405,6 @@ class RequirementsTest extends SapphireTest {
public function testSuffix() {
$template = '<html><head></head><body><header>My header</header><p>Body</p></body></html>';
$basePath = $this->getCurrentRelativePath();
$basePath = 'framework' . substr($basePath, strlen(FRAMEWORK_DIR));
$backend = new Requirements_Backend;

View File

@ -1261,6 +1261,8 @@ after')
}
public function testRequireCallInTemplateInclude() {
//TODO undo skip test on the event that templates ever obtain the ability to reference MODULE_DIR (or something to that effect)
if(FRAMEWORK_DIR === 'framework') {
$template = new SSViewer(array('SSViewerTestProcess'));
Requirements::set_suffix_requirements(false);
@ -1270,6 +1272,11 @@ after')
"tests/forms/RequirementsTest_a.js"
));
}
else {
$this->markTestSkipped('Requirement will always fail if the framework dir is not '.
'named \'framework\', since templates require hard coded paths');
}
}
public function testCallsWithArguments() {
$data = new ArrayData(array(