From 01e0ce7b2492b403151aa4577c4c80d630daa8c1 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Sat, 14 Apr 2012 18:48:28 +1200 Subject: [PATCH] MINOR Ensure assertions of RequirementsTest use "framework" as the FRAMEWORK_DIR, otherwise assertions of require() calls in RequirementsTest_Conditionals template fail --- tests/forms/RequirementsTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/forms/RequirementsTest.php b/tests/forms/RequirementsTest.php index 9c1ead1c2..ac588a0ba 100644 --- a/tests/forms/RequirementsTest.php +++ b/tests/forms/RequirementsTest.php @@ -241,7 +241,9 @@ class RequirementsTest extends SapphireTest { function testConditionalTemplateRequire() { $basePath = $this->getCurrentRelativePath(); - + // we're asserting "framework", so set the relative path accordingly in case FRAMEWORK_DIR was changed to something else + $basePath = 'framework' . substr($basePath, strlen(FRAMEWORK_DIR)); + $backend = new RequirementsTest_Backend(); $holder = Requirements::backend(); Requirements::set_backend($backend);