Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Supressing deprecation warnings in FieldListTest for new FieldL…

…ist->rewriteTabPath() invocations
  • Loading branch information...
commit 368081f63ccd3748858ea601119fa297be110941 1 parent 61232ba
@chillu chillu authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/forms/FieldListTest.php
View
10 tests/forms/FieldListTest.php
@@ -790,6 +790,9 @@ function testVisibleAndHiddenFields() {
}
function testRewriteTabPath() {
+ $originalDeprecation = Deprecation::dump_settings();
+ Deprecation::notification_version('2.4');
+
$fields = new FieldList(
new Tabset("Root",
$tab1Level1 = new Tab("Tab1Level1",
@@ -820,9 +823,14 @@ function testRewriteTabPath() {
$method->invoke($fields, 'Root.Tab1Level1.Tab1Level2'),
'Indirect aliasing on toplevel'
);
+
+ Deprecation::restore_settings($originalDeprecation);
}
function testRewriteTabPathFindOrMakeTab() {
+ $originalDeprecation = Deprecation::dump_settings();
+ Deprecation::notification_version('2.4');
+
$fields = new FieldList(
new Tabset("Root",
$tab1Level1 = new Tab("Tab1Level1Renamed",
@@ -849,6 +857,8 @@ function testRewriteTabPathFindOrMakeTab() {
$this->assertEquals($tab1Level2, $fields->findOrMakeTab('Root.Tab1Level1Renamed.Tab1Level2'),
'findOrMakeTab() with nested tab under new parent tab name'
);
+
+ Deprecation::restore_settings($originalDeprecation);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.