Skip to content
This repository
Browse code

MINOR Fix tests to check against dynamic FRAMEWORK_DIR and $project

instead of hardcoding these checks
  • Loading branch information...
commit c45027d2473b3029afe24167ab5cbdcc3708aa44 1 parent 6405c44
Sean Harvey authored April 14, 2012

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. 7  tests/dev/DeprecationTest.php
7  tests/dev/DeprecationTest.php
@@ -52,7 +52,8 @@ function testGreaterVersionTriggersNotice() {
52 52
 
53 53
 	function testNonMatchingModuleNotifcationVersionDoesntAffectNotice() {
54 54
 		Deprecation::notification_version('1.0.0');
55  
-		Deprecation::notification_version('3.0.0', 'mysite');
  55
+		global $project;
  56
+		Deprecation::notification_version('3.0.0', $project);
56 57
 		$this->callThatOriginatesFromFramework();
57 58
 	}
58 59
 
@@ -61,12 +62,12 @@ function testNonMatchingModuleNotifcationVersionDoesntAffectNotice() {
61 62
 	 */
62 63
 	function testMatchingModuleNotifcationVersionAffectsNotice() {
63 64
 		Deprecation::notification_version('1.0.0');
64  
-		Deprecation::notification_version('3.0.0', 'framework');
  65
+		Deprecation::notification_version('3.0.0', FRAMEWORK_DIR);
65 66
 		$this->callThatOriginatesFromFramework();
66 67
 	}
67 68
 
68 69
 	protected function callThatOriginatesFromFramework() {
69  
-		$this->assertEquals(DeprecationTest_Deprecation::get_module(), 'framework');
  70
+		$this->assertEquals(DeprecationTest_Deprecation::get_module(), FRAMEWORK_DIR);
70 71
 		Deprecation::notice('2.0', 'Deprecation test passed');
71 72
 	}
72 73
 

0 notes on commit c45027d

Please sign in to comment.
Something went wrong with that request. Please try again.