From 54d4919e3f1b00b644fa3c107acdf20159a1b154 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 12 Aug 2006 05:34:54 +0000 Subject: Update active controls. --- .../protected/pages/ReplaceContentTest.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php') diff --git a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php index 0e09a012..a5358d98 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php @@ -4,27 +4,38 @@ class ReplaceContentTest extends TPage { function appendContent($sender, $param) { - $this->CallbackClient->appendContent($this->subpanel, $this->content->Text); + $this->CallbackClient->appendContent($this->subpanel, $this->replacementContent()); } function prependContent($sender, $param) { - $this->CallbackClient->prependContent($this->subpanel, $this->content->Text); + $this->CallbackClient->prependContent($this->subpanel, $this->replacementContent()); } function insertContentBefore($sender, $param) { - $this->CallbackClient->insertContentBefore($this->subpanel, $this->content->Text); + $this->CallbackClient->insertContentBefore($this->subpanel, $this->replacementContent()); } function insertContentAfter($sender, $param) { - $this->CallbackClient->insertContentAfter($this->subpanel, $this->content->Text); + $this->CallbackClient->insertContentAfter($this->subpanel, $this->replacementContent()); } function replaceContent($sender, $param) { - $this->CallbackClient->replaceContent($this->subpanel, $this->content->Text); + $this->CallbackClient->replaceContent($this->subpanel, $this->replacementContent()); + } + + function replacementContent() + { + if($this->check1->Checked) + { + $this->newPanel->Visible=true; + return $this->newPanel; + } + else + return $this->content->Text; } } -- cgit v1.2.3