Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Fix tests to check against dynamic FRAMEWORK_DIR and $project

instead of hardcoding these checks
  • Loading branch information...
commit c45027d2473b3029afe24167ab5cbdcc3708aa44 1 parent 6405c44
@halkyon halkyon authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 tests/dev/DeprecationTest.php
View
7 tests/dev/DeprecationTest.php
@@ -52,7 +52,8 @@ function testGreaterVersionTriggersNotice() {
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 @@ function testNonMatchingModuleNotifcationVersionDoesntAffectNotice() {
*/
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');
}
Please sign in to comment.
Something went wrong with that request. Please try again.