mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
98ab540aba
commit
e4b563e596
@ -405,7 +405,6 @@ class RequirementsTest extends SapphireTest {
|
|||||||
public function testSuffix() {
|
public function testSuffix() {
|
||||||
$template = '<html><head></head><body><header>My header</header><p>Body</p></body></html>';
|
$template = '<html><head></head><body><header>My header</header><p>Body</p></body></html>';
|
||||||
$basePath = $this->getCurrentRelativePath();
|
$basePath = $this->getCurrentRelativePath();
|
||||||
$basePath = 'framework' . substr($basePath, strlen(FRAMEWORK_DIR));
|
|
||||||
|
|
||||||
$backend = new Requirements_Backend;
|
$backend = new Requirements_Backend;
|
||||||
|
|
||||||
|
@ -1261,14 +1261,21 @@ after')
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function testRequireCallInTemplateInclude() {
|
public function testRequireCallInTemplateInclude() {
|
||||||
$template = new SSViewer(array('SSViewerTestProcess'));
|
//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);
|
Requirements::set_suffix_requirements(false);
|
||||||
|
|
||||||
$this->assertEquals(1, substr_count(
|
$this->assertEquals(1, substr_count(
|
||||||
$template->process(array()),
|
$template->process(array()),
|
||||||
"tests/forms/RequirementsTest_a.js"
|
"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() {
|
public function testCallsWithArguments() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user