mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fix tests to check against dynamic FRAMEWORK_DIR and $project
instead of hardcoding these checks
This commit is contained in:
parent
6405c44bc2
commit
c45027d247
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user