mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Supressing deprecation warnings in FieldListTest for new FieldList->rewriteTabPath() invocations
This commit is contained in:
parent
61232ba848
commit
368081f63c
@ -790,6 +790,9 @@ class FieldListTest extends SapphireTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testRewriteTabPath() {
|
function testRewriteTabPath() {
|
||||||
|
$originalDeprecation = Deprecation::dump_settings();
|
||||||
|
Deprecation::notification_version('2.4');
|
||||||
|
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
new Tabset("Root",
|
new Tabset("Root",
|
||||||
$tab1Level1 = new Tab("Tab1Level1",
|
$tab1Level1 = new Tab("Tab1Level1",
|
||||||
@ -820,9 +823,14 @@ class FieldListTest extends SapphireTest {
|
|||||||
$method->invoke($fields, 'Root.Tab1Level1.Tab1Level2'),
|
$method->invoke($fields, 'Root.Tab1Level1.Tab1Level2'),
|
||||||
'Indirect aliasing on toplevel'
|
'Indirect aliasing on toplevel'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Deprecation::restore_settings($originalDeprecation);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRewriteTabPathFindOrMakeTab() {
|
function testRewriteTabPathFindOrMakeTab() {
|
||||||
|
$originalDeprecation = Deprecation::dump_settings();
|
||||||
|
Deprecation::notification_version('2.4');
|
||||||
|
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
new Tabset("Root",
|
new Tabset("Root",
|
||||||
$tab1Level1 = new Tab("Tab1Level1Renamed",
|
$tab1Level1 = new Tab("Tab1Level1Renamed",
|
||||||
@ -849,6 +857,8 @@ class FieldListTest extends SapphireTest {
|
|||||||
$this->assertEquals($tab1Level2, $fields->findOrMakeTab('Root.Tab1Level1Renamed.Tab1Level2'),
|
$this->assertEquals($tab1Level2, $fields->findOrMakeTab('Root.Tab1Level1Renamed.Tab1Level2'),
|
||||||
'findOrMakeTab() with nested tab under new parent tab name'
|
'findOrMakeTab() with nested tab under new parent tab name'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Deprecation::restore_settings($originalDeprecation);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user