Skip to content

Commit

Permalink
MINOR Supressing deprecation warnings in FieldListTest for new FieldL…
Browse files Browse the repository at this point in the history
…ist->rewriteTabPath() invocations
  • Loading branch information
chillu committed May 12, 2012
1 parent 61232ba commit 368081f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/forms/FieldListTest.php
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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);
}

}

0 comments on commit 368081f

Please sign in to comment.