From c45027d2473b3029afe24167ab5cbdcc3708aa44 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Sat, 14 Apr 2012 13:25:40 +1200 Subject: [PATCH] MINOR Fix tests to check against dynamic FRAMEWORK_DIR and $project instead of hardcoding these checks --- tests/dev/DeprecationTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/dev/DeprecationTest.php b/tests/dev/DeprecationTest.php index a9290fb35..ef77668bd 100644 --- a/tests/dev/DeprecationTest.php +++ b/tests/dev/DeprecationTest.php @@ -52,7 +52,8 @@ class DeprecationTest extends SapphireTest { function testNonMatchingModuleNotifcationVersionDoesntAffectNotice() { Deprecation::notification_version('1.0.0'); - Deprecation::notification_version('3.0.0', 'mysite'); + global $project; + Deprecation::notification_version('3.0.0', $project); $this->callThatOriginatesFromFramework(); } @@ -61,12 +62,12 @@ class DeprecationTest extends SapphireTest { */ function testMatchingModuleNotifcationVersionAffectsNotice() { Deprecation::notification_version('1.0.0'); - Deprecation::notification_version('3.0.0', 'framework'); + Deprecation::notification_version('3.0.0', FRAMEWORK_DIR); $this->callThatOriginatesFromFramework(); } protected function callThatOriginatesFromFramework() { - $this->assertEquals(DeprecationTest_Deprecation::get_module(), 'framework'); + $this->assertEquals(DeprecationTest_Deprecation::get_module(), FRAMEWORK_DIR); Deprecation::notice('2.0', 'Deprecation test passed'); }