diff options
Diffstat (limited to 'tests/FunctionalTests/active-controls')
66 files changed, 1760 insertions, 1760 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.php index e873ae9d..d0b8650e 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.php @@ -1,26 +1,26 @@ -<?php
-
-class ActiveControlExpressionTag extends TPage
-{
- public function button1_clicked($sender, $param)
- {
- $this->subpanel1->Visible = true;
- $data = array('1', 'two');
- $this->repeater1->DataSource = $data;
- $this->repeater1->dataBind();
- }
-
- public function button1_callback($sender, $param)
- {
- $this->panel1->renderControl($param->NewWriter);
- $this->button2->Enabled=true;
- }
-
- public function button2_callback($sender, $param)
- {
- $this->panel2->Visible=true;
- $this->Page->CallbackClient->insertContentAfter('contents', $this->panel2);
- }
-}
-
+<?php + +class ActiveControlExpressionTag extends TPage +{ + public function button1_clicked($sender, $param) + { + $this->subpanel1->Visible = true; + $data = array('1', 'two'); + $this->repeater1->DataSource = $data; + $this->repeater1->dataBind(); + } + + public function button1_callback($sender, $param) + { + $this->panel1->renderControl($param->NewWriter); + $this->button2->Enabled=true; + } + + public function button2_callback($sender, $param) + { + $this->panel2->Visible=true; + $this->Page->CallbackClient->insertContentAfter('contents', $this->panel2); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.php index a154e0dd..ec9040a1 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.php @@ -1,11 +1,11 @@ -<?php
-
-class ActiveControlWithTinyMce extends TPage
-{
- function button1_callback($sender, $param)
- {
- $this->label1->Text = $this->text1->SafeText;
- }
-}
-
+<?php + +class ActiveControlWithTinyMce extends TPage +{ + function button1_callback($sender, $param) + { + $this->label1->Text = $this->text1->SafeText; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php index eced2457..44c20ef6 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php @@ -1,31 +1,31 @@ -<?php
-
-class ActiveImageButtonTest extends TPage
-{
- function change_text($sender, $param)
- {
- $this->image1->AlternateText = "Muahahahah";
- }
-
- function change_image($sender, $param)
- {
- $this->image1->ImageUrl = $sender->CustomData;
- }
-
- function change_align($sender, $param)
- {
- $this->image1->ImageAlign="absbottom";
- }
-
- function change_description($sender, $param)
- {
- $this->image1->DescriptionUrl = "maahahhaa";
- }
-
- function image1_clicked($sender, $param)
- {
- $this->label1->Text = "Image clicked at x={$param->x}, y={$param->y}";
- }
-}
-
+<?php + +class ActiveImageButtonTest extends TPage +{ + function change_text($sender, $param) + { + $this->image1->AlternateText = "Muahahahah"; + } + + function change_image($sender, $param) + { + $this->image1->ImageUrl = $sender->CustomData; + } + + function change_align($sender, $param) + { + $this->image1->ImageAlign="absbottom"; + } + + function change_description($sender, $param) + { + $this->image1->DescriptionUrl = "maahahhaa"; + } + + function image1_clicked($sender, $param) + { + $this->label1->Text = "Image clicked at x={$param->x}, y={$param->y}"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.php index 4fc3a23e..74ce985c 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.php @@ -1,16 +1,16 @@ -<?php
-
-class ActiveLinkButtonTest extends TPage
-{
- function button2_onclick($sender, $param)
- {
- $this->label1->Text = "Button 1 was clicked ";
- }
-
- function button2_oncallback($sender, $param)
- {
- $this->label1->Text .= "using callback!";
- }
-}
-
+<?php + +class ActiveLinkButtonTest extends TPage +{ + function button2_onclick($sender, $param) + { + $this->label1->Text = "Button 1 was clicked "; + } + + function button2_oncallback($sender, $param) + { + $this->label1->Text .= "using callback!"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.php index d2991653..eaa61fd6 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.php @@ -1,47 +1,47 @@ -<?php
-
-class ActiveListBoxMasterTest extends TPage
-{
- function list1_callback($sender, $param)
- {
- $values = $sender->getSelectedValues();
- $this->label1->setText("Selection: ".implode(', ', $values));
- }
-
- function select_index_123()
- {
- $this->list1->setSelectedIndices(array(1,2,3));
- }
-
- function select_index_4()
- {
- $this->list1->setSelectedIndex(4);
- }
-
- function clear_selections()
- {
- $this->list1->clearSelection();
- }
-
- function select_value_1()
- {
- $this->list1->setSelectedValue("value 1");
- }
-
- function select_values_25()
- {
- $this->list1->setSelectedValues(array('value 2', 'value 5'));
- }
-
- function change_to_multiple()
- {
- $this->list1->SelectionMode="Multiple";
- }
-
- function change_to_single()
- {
- $this->list1->SelectionMode="Single";
- }
-}
-
+<?php + +class ActiveListBoxMasterTest extends TPage +{ + function list1_callback($sender, $param) + { + $values = $sender->getSelectedValues(); + $this->label1->setText("Selection: ".implode(', ', $values)); + } + + function select_index_123() + { + $this->list1->setSelectedIndices(array(1,2,3)); + } + + function select_index_4() + { + $this->list1->setSelectedIndex(4); + } + + function clear_selections() + { + $this->list1->clearSelection(); + } + + function select_value_1() + { + $this->list1->setSelectedValue("value 1"); + } + + function select_values_25() + { + $this->list1->setSelectedValues(array('value 2', 'value 5')); + } + + function change_to_multiple() + { + $this->list1->SelectionMode="Multiple"; + } + + function change_to_single() + { + $this->list1->SelectionMode="Single"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.php index 942bb1a0..a80dbc1c 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.php @@ -1,47 +1,47 @@ -<?php
-
-class ActiveListBoxTest extends TPage
-{
- function list1_callback($sender, $param)
- {
- $values = $sender->getSelectedValues();
- $this->label1->setText("Selection: ".implode(', ', $values));
- }
-
- function select_index_123()
- {
- $this->list1->setSelectedIndices(array(1,2,3));
- }
-
- function select_index_4()
- {
- $this->list1->setSelectedIndex(4);
- }
-
- function clear_selections()
- {
- $this->list1->clearSelection();
- }
-
- function select_value_1()
- {
- $this->list1->setSelectedValue("value 1");
- }
-
- function select_values_25()
- {
- $this->list1->setSelectedValues(array('value 2', 'value 5'));
- }
-
- function change_to_multiple()
- {
- $this->list1->SelectionMode="Multiple";
- }
-
- function change_to_single()
- {
- $this->list1->SelectionMode="Single";
- }
-}
-
+<?php + +class ActiveListBoxTest extends TPage +{ + function list1_callback($sender, $param) + { + $values = $sender->getSelectedValues(); + $this->label1->setText("Selection: ".implode(', ', $values)); + } + + function select_index_123() + { + $this->list1->setSelectedIndices(array(1,2,3)); + } + + function select_index_4() + { + $this->list1->setSelectedIndex(4); + } + + function clear_selections() + { + $this->list1->clearSelection(); + } + + function select_value_1() + { + $this->list1->setSelectedValue("value 1"); + } + + function select_values_25() + { + $this->list1->setSelectedValues(array('value 2', 'value 5')); + } + + function change_to_multiple() + { + $this->list1->SelectionMode="Multiple"; + } + + function change_to_single() + { + $this->list1->SelectionMode="Single"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.php index e922319e..aaf43abc 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.php @@ -1,18 +1,18 @@ -<?php
-
-class ActivePanelVisibleTest extends TPage
-{
- public function showA()
- {
- $this->pnlB->Visible = false;
- $this->pnlA->Visible = true;
- }
-
- public function showB()
- {
- $this->pnlB->Visible = true;
- $this->pnlA->Visible = false;
- }
-}
-
+<?php + +class ActivePanelVisibleTest extends TPage +{ + public function showA() + { + $this->pnlB->Visible = false; + $this->pnlA->Visible = true; + } + + public function showB() + { + $this->pnlB->Visible = true; + $this->pnlA->Visible = false; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php index ee805e11..22d2c79c 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php @@ -1,28 +1,28 @@ -<?php
-
-class ActiveRadioButtonListTest extends TPage
-{
- function list1_callback($sender, $param)
- {
- $values = $sender->getSelectedValues();
- var_dump($values);
- $this->label1->setText("Selection: ".implode(', ', $values));
- }
-
- function select_index_4()
- {
- $this->list1->setSelectedIndex(4);
- }
-
- function clear_selections()
- {
- $this->list1->clearSelection();
- }
-
- function select_value_1()
- {
- $this->list1->setSelectedValue("value 1");
- }
-}
-
+<?php + +class ActiveRadioButtonListTest extends TPage +{ + function list1_callback($sender, $param) + { + $values = $sender->getSelectedValues(); + var_dump($values); + $this->label1->setText("Selection: ".implode(', ', $values)); + } + + function select_index_4() + { + $this->list1->setSelectedIndex(4); + } + + function clear_selections() + { + $this->list1->clearSelection(); + } + + function select_value_1() + { + $this->list1->setSelectedValue("value 1"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.php index 64e7d92e..fce204d1 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.php @@ -1,34 +1,34 @@ -<?php
-
-class ActiveRadioButtonTest extends TPage
-{
- function change_radio1_text()
- {
- $this->radio1->Text = "Hello Radio Button 1";
- }
-
- function change_radio1_checked()
- {
- $this->radio1->Checked = !$this->radio1->Checked;
- }
-
- function change_radio2_text()
- {
- $this->radio2->Text = "Radio Button 2 World";
- }
-
- function change_radio2_checked()
- {
- $this->radio2->Checked = !$this->radio2->Checked;
- }
-
- function radiobutton_requested($sender, $param)
- {
- $this->label1->Text = "Label 1:".$sender->Text.
- ($sender->checked ? ' Checked ' : ' Not Checked');
- }
-
-
-}
-
+<?php + +class ActiveRadioButtonTest extends TPage +{ + function change_radio1_text() + { + $this->radio1->Text = "Hello Radio Button 1"; + } + + function change_radio1_checked() + { + $this->radio1->Checked = !$this->radio1->Checked; + } + + function change_radio2_text() + { + $this->radio2->Text = "Radio Button 2 World"; + } + + function change_radio2_checked() + { + $this->radio2->Checked = !$this->radio2->Checked; + } + + function radiobutton_requested($sender, $param) + { + $this->label1->Text = "Label 1:".$sender->Text. + ($sender->checked ? ' Checked ' : ' Not Checked'); + } + + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php index c825f3f8..50b9817d 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php @@ -1,27 +1,27 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListAllowInputTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListAllowInputTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue()); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php index 4b087b76..c094a34b 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php @@ -1,27 +1,27 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListAutoPostBackTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListAutoPostBackTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue()); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php index 5c6dfa70..0ba260d4 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php @@ -1,23 +1,23 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListCheckBoxesTest extends TPage{ }
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListCheckBoxesTest extends TPage{ } ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php index 0cac7418..fde87812 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php @@ -1,37 +1,37 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListEnabledTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
- }
-
- public function enable($sender, $param){
- $this->RatingList->setEnabled(true);
- $this->Status->setText('Enabled=true');
- }
-
- public function disable($sender, $param){
- $this->RatingList->setEnabled(false);
- $this->Status->setText('Enabled=false');
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListEnabledTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue()); + } + + public function enable($sender, $param){ + $this->RatingList->setEnabled(true); + $this->Status->setText('Enabled=true'); + } + + public function disable($sender, $param){ + $this->RatingList->setEnabled(false); + $this->Status->setText('Enabled=false'); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php index 06d82d39..c8281256 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php @@ -1,27 +1,27 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListHoverCaptionTest extends TPage{
- public function ratingChanged($sender, $param){
- $sender->setCaption($sender->getRating().' : '.$sender->getSelectedValue());
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListHoverCaptionTest extends TPage{ + public function ratingChanged($sender, $param){ + $sender->setCaption($sender->getRating().' : '.$sender->getSelectedValue()); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php index fe5c8404..97369a8d 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php @@ -1,32 +1,32 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListRatingTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText('Rating: '.$sender->getRating());
- }
-
- public function setRating($sender, $param){
- $this->RatingList->setRating(3);
- $this->ratingChanged($this->RatingList, null);
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListRatingTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText('Rating: '.$sender->getRating()); + } + + public function setRating($sender, $param){ + $this->RatingList->setRating(3); + $this->ratingChanged($this->RatingList, null); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php index 070fd13f..722f60ea 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php @@ -1,38 +1,38 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListReadOnlyTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
- }
-
- public function readOnly($sender, $param){
- $this->RatingList->setReadOnly(true);
- $this->Status->setText('ReadOnly=true');
- }
-
- public function writable($sender, $param){
- $this->RatingList->setReadOnly(false);
- $this->Status->setText('ReadOnly=false');
- }
-
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListReadOnlyTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue()); + } + + public function readOnly($sender, $param){ + $this->RatingList->setReadOnly(true); + $this->Status->setText('ReadOnly=true'); + } + + public function writable($sender, $param){ + $this->RatingList->setReadOnly(false); + $this->Status->setText('ReadOnly=false'); + } + +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php index 4dbc6949..f0d8d2ef 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php @@ -1,32 +1,32 @@ -<?php
-/**
- * TRatingListTest.php
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Creation Date: Oct 13, 2008
- */
-
-/**
- * TRatingListTest.php class
- *
- *
- *
- * Properties
- * -
- *
- * @author Bradley Booms <Bradley.Booms@nsighttel.com>
- * @version Modified Date: Oct 13, 2008
- *
- * Modifications:
- */
-class ActiveRatingListSelectedIndexTest extends TPage{
- public function ratingChanged($sender, $param){
- $this->Status->setText('SelectedIndex: '.$sender->getSelectedIndex());
- }
-
- public function setSelectedIndex($sender, $param){
- $this->RatingList->setSelectedIndex(5);
- $this->ratingChanged($this->RatingList, null);
- }
-}
+<?php +/** + * TRatingListTest.php + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Creation Date: Oct 13, 2008 + */ + +/** + * TRatingListTest.php class + * + * + * + * Properties + * - + * + * @author Bradley Booms <Bradley.Booms@nsighttel.com> + * @version Modified Date: Oct 13, 2008 + * + * Modifications: + */ +class ActiveRatingListSelectedIndexTest extends TPage{ + public function ratingChanged($sender, $param){ + $this->Status->setText('SelectedIndex: '.$sender->getSelectedIndex()); + } + + public function setSelectedIndex($sender, $param){ + $this->RatingList->setSelectedIndex(5); + $this->ratingChanged($this->RatingList, null); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.php index 65958eeb..a3c714fe 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.php @@ -1,12 +1,12 @@ -<?php
-
-class ActiveRedirectionTest extends TPage
-{
- function button_clicked($sender, $param)
- {
- $default=$this->Service->constructUrl($this->Service->DefaultPage);
- $this->Response->redirect($default);
- }
-}
-
+<?php + +class ActiveRedirectionTest extends TPage +{ + function button_clicked($sender, $param) + { + $default=$this->Service->constructUrl($this->Service->DefaultPage); + $this->Response->redirect($default); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Callback.php b/tests/FunctionalTests/active-controls/protected/pages/Callback.php index d19d92aa..00357f1e 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Callback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Callback.php @@ -1,13 +1,13 @@ -<?php
-
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Callback extends TPage
-{
- function callback1_Requested()
- {
- var_dump("ok!");
- }
-}
-
+<?php + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Callback extends TPage +{ + function callback1_Requested() + { + var_dump("ok!"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php index bf8d730b..319cc354 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.php @@ -1,11 +1,11 @@ -<?php
-
-class CallbackCustomValidatorTest extends TPage
-{
- function validate_text1($sender, $param)
- {
- $param->IsValid = $param->Value == 'Prado';
- }
-}
-
+<?php + +class CallbackCustomValidatorTest extends TPage +{ + function validate_text1($sender, $param) + { + $param->IsValid = $param->Value == 'Prado'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php index 84099114..e747bb63 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.php @@ -1,17 +1,17 @@ -<?php
-
-class ClientSideDispatch extends TPage
-{
-
- function method1($sender, $param)
- {
- $this->status1->Text = "Method 1 callback with parameter: {$param->CallbackParameter}";
- }
-
- function method2($sender, $param)
- {
- $this->status2->Text = "Method 2 callback";
- }
-}
-
+<?php + +class ClientSideDispatch extends TPage +{ + + function method1($sender, $param) + { + $this->status1->Text = "Method 1 callback with parameter: {$param->CallbackParameter}"; + } + + function method2($sender, $param) + { + $this->status2->Text = "Method 2 callback"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateComponent.php b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateComponent.php index 7da2834e..8a3e6c9f 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateComponent.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateComponent.php @@ -1,11 +1,11 @@ -<?php
-
-class CustomTemplateComponent extends TTemplateControl
-{
- public function suboncallback ($sender, $param)
- {
- $sender->setText("Foo");
- }
-}
-
+<?php + +class CustomTemplateComponent extends TTemplateControl +{ + public function suboncallback ($sender, $param) + { + $sender->setText("Foo"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php index 18005a2b..a1d55adc 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php @@ -1,27 +1,27 @@ -<?php
-
-class CustomTemplateControlTest extends TPage
-{
- function button2_onclick($sender, $param)
- {
-
- $this->label1->Text = "Button 1 was clicked ";
- $this->label1->Text .= $this->foo->Text;
-
- $x=Prado::createComponent('Application.pages.CustomTemplateComponent');
-
- $this->placeholder->getControls()->add($x);
- $this->placeholder->dataBind();
- }
-
- function button2_callback($sender, $param)
- {
- $this->placeholder->render($param->NewWriter);
-
- $this->label1->Text .= " using callback!";
- $this->label1->Text .= "... and this is the textbox text: ". $this->foo->Text;
- }
-
-}
-
+<?php + +class CustomTemplateControlTest extends TPage +{ + function button2_onclick($sender, $param) + { + + $this->label1->Text = "Button 1 was clicked "; + $this->label1->Text .= $this->foo->Text; + + $x=Prado::createComponent('Application.pages.CustomTemplateComponent'); + + $this->placeholder->getControls()->add($x); + $this->placeholder->dataBind(); + } + + function button2_callback($sender, $param) + { + $this->placeholder->render($param->NewWriter); + + $this->label1->Text .= " using callback!"; + $this->label1->Text .= "... and this is the textbox text: ". $this->foo->Text; + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php index 54c99c64..edc68ae4 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php @@ -1,37 +1,37 @@ -<?php
-
-class CustomValidatorByPass extends TPage
-{
- public function onLoad($param)
- {
-
- parent::onLoad($param);
-
- $Client = $this->validator2->getActiveControl()->getClientSide();
-
- $Client->setOnLoading('$(\'loginLoader\').show();');
- $Client->setOnComplete('$(\'loginLoader\').hide();');
-
- //$Client->setOnValidationError('alert(\'Authentication Failed\');');
- //$Client->setOnValidationSuccess('new Effect.Fade(\'loginBox\')');
-
- }
-
- public function validateUser($sender,$param)
- {
- $param->IsValid = $this->Password->Text=='test';
- }
-
- public function doLogin($sender,$param)
- {
-
- /* This isnt even getting called */
- if($this->Page->IsValid)
- {
- // Re-Render the active panel
- }
-
- }
-}
-
+<?php + +class CustomValidatorByPass extends TPage +{ + public function onLoad($param) + { + + parent::onLoad($param); + + $Client = $this->validator2->getActiveControl()->getClientSide(); + + $Client->setOnLoading('$(\'loginLoader\').show();'); + $Client->setOnComplete('$(\'loginLoader\').hide();'); + + //$Client->setOnValidationError('alert(\'Authentication Failed\');'); + //$Client->setOnValidationSuccess('new Effect.Fade(\'loginBox\')'); + + } + + public function validateUser($sender,$param) + { + $param->IsValid = $this->Password->Text=='test'; + } + + public function doLogin($sender,$param) + { + + /* This isnt even getting called */ + if($this->Page->IsValid) + { + // Re-Render the active panel + } + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php b/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php index d318660d..ce3d1bc0 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php @@ -1,63 +1,63 @@ -<?php
-
-class DMessagesPanel extends TTemplateControl
-{
- private $_panelCssClass = '';
-
- public function onInit($param)
- {
- parent::onInit($param);
- $this->MessagesPanelEffect->Text = "";
- }
-
- public function setMessage($value)
- {
- $this->Message->Text = $value;
- if ($value != '')
- $this->setVisible(true);
- else
- $this->setVisible(false);
- }
-
- public function setVisible($value)
- {
- $this->ensureChildControls();
- if ($value === true) {
- echo "set visible";
- $this->MessagesPanel->Visible = true;
- $this->Message->Visible = true;
- $this->setEffect(null);
- } else {
- $this->MessagesPanel->Visible = false;
- }
- }
-
- public function setEffect($effect = null)
- {
- if ($effect !== null) {
- $text = "<script type=\"text/javascript\" language=\"javascript\">\r\n";
- $text .= "// <![CDATA[\r\n";
- //$text .= "new Effect.$effect(\"" . $this->Page->DMessagesPanel->MessagesPanel->ClientID . "\");\r\n";
- $text .= "new Effect.$effect(\"" . $this->ClientID . "\");\r\n";
- $text .= "// ]]>\r\n";
- $text .= "</script>";
- $this->MessagesPanelEffect->Text = $text;
- } else {
- $this->MessagesPanelEffect->Text = '';
- }
- }
-
- public function setPanelCssClass($value)
- {
- $this->ensureChildControls();
- $this->MessagesPanel->CssClass = $value;
- }
-
- public function setMessageCssClass($value)
- {
- $this->ensureChildControls();
- $this->Message->CssClass = $value;
- }
-}
-
+<?php + +class DMessagesPanel extends TTemplateControl +{ + private $_panelCssClass = ''; + + public function onInit($param) + { + parent::onInit($param); + $this->MessagesPanelEffect->Text = ""; + } + + public function setMessage($value) + { + $this->Message->Text = $value; + if ($value != '') + $this->setVisible(true); + else + $this->setVisible(false); + } + + public function setVisible($value) + { + $this->ensureChildControls(); + if ($value === true) { + echo "set visible"; + $this->MessagesPanel->Visible = true; + $this->Message->Visible = true; + $this->setEffect(null); + } else { + $this->MessagesPanel->Visible = false; + } + } + + public function setEffect($effect = null) + { + if ($effect !== null) { + $text = "<script type=\"text/javascript\" language=\"javascript\">\r\n"; + $text .= "// <![CDATA[\r\n"; + //$text .= "new Effect.$effect(\"" . $this->Page->DMessagesPanel->MessagesPanel->ClientID . "\");\r\n"; + $text .= "new Effect.$effect(\"" . $this->ClientID . "\");\r\n"; + $text .= "// ]]>\r\n"; + $text .= "</script>"; + $this->MessagesPanelEffect->Text = $text; + } else { + $this->MessagesPanelEffect->Text = ''; + } + } + + public function setPanelCssClass($value) + { + $this->ensureChildControls(); + $this->MessagesPanel->CssClass = $value; + } + + public function setMessageCssClass($value) + { + $this->ensureChildControls(); + $this->Message->CssClass = $value; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php index 94a4ec25..05fd323e 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php @@ -1,17 +1,17 @@ -<?php
-
-class DatePickerInCallback extends TPage {
-
- public function onLoad($param){
- parent::onLoad($param);
- if(!$this->IsPostBack)
- $this->datepicker->setTimeStamp(time());
- }
-
- public function testDatePicker($sender, $param){
- $this->status->Text = $this->datepicker->getTimestamp()." ".$this->datepicker->getText();
- }
-
- }
-
+<?php + +class DatePickerInCallback extends TPage { + + public function onLoad($param){ + parent::onLoad($param); + if(!$this->IsPostBack) + $this->datepicker->setTimeStamp(time()); + } + + public function testDatePicker($sender, $param){ + $this->status->Text = $this->datepicker->getTimestamp()." ".$this->datepicker->getText(); + } + + } + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php index 7e9195dc..1785bd34 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php @@ -1,21 +1,21 @@ -<?php
-
-class DelayedCallback extends TPage
-{
- function callback1($sender, $param)
- {
- $ms = 4;
- sleep($ms);
- $this->status->Text="Callback 1 returned after {$ms}s";
- }
-
- function callback2($sender, $param)
- {
- $ms = 2;
- sleep($ms);
- $this->status->Text="Callback 2 delayed {$ms}s";
- }
-
-}
-
+<?php + +class DelayedCallback extends TPage +{ + function callback1($sender, $param) + { + $ms = 4; + sleep($ms); + $this->status->Text="Callback 1 returned after {$ms}s"; + } + + function callback2($sender, $param) + { + $ms = 2; + sleep($ms); + $this->status->Text="Callback 2 delayed {$ms}s"; + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php index a49a8bfa..7c791564 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php @@ -1,26 +1,26 @@ -<?php
-
-class DisplayStyleTest extends TPage
-{
- function display_button1()
- {
- $this->button1->Display="Dynamic";
- }
-
- function hide_button1()
- {
- $this->button1->Display="None";
- }
-
- function show_button2()
- {
- $this->button2->Display="Fixed";
- }
-
- function hide_button2()
- {
- $this->button2->Display="Hidden";
- }
-}
-
+<?php + +class DisplayStyleTest extends TPage +{ + function display_button1() + { + $this->button1->Display="Dynamic"; + } + + function hide_button1() + { + $this->button1->Display="None"; + } + + function show_button2() + { + $this->button2->Display="Fixed"; + } + + function hide_button2() + { + $this->button2->Display="Hidden"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.php b/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.php index 729a87dc..0df32f6a 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.php @@ -1,23 +1,23 @@ -<?php
-
-class DynamicRepeaterDataTest extends TPage
-{
- function button_clicked($sender, $param)
- {
- $this->_repeater->dataSource = array(1,2,3);
- $this->_repeater->dataBind();
- }
-
- function button_callback($sender, $param)
- {
- $this->panel1->render($param->NewWriter);
- }
-
- function rpt_button_clicked($sender, $param)
- {
- $item = $sender->NamingContainer;
- $item->label1->Text = $sender->Text;
- }
-}
-
+<?php + +class DynamicRepeaterDataTest extends TPage +{ + function button_clicked($sender, $param) + { + $this->_repeater->dataSource = array(1,2,3); + $this->_repeater->dataBind(); + } + + function button_callback($sender, $param) + { + $this->panel1->render($param->NewWriter); + } + + function rpt_button_clicked($sender, $param) + { + $item = $sender->NamingContainer; + $item->label1->Text = $sender->Text; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php index dc47d867..bcc53389 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php @@ -1,21 +1,21 @@ -<?php
-
-class EventTriggeredCallback extends TPage
-{
- function text1_focused($sender, $param)
- {
- $this->label1->Text = 'text 1 focused';
- }
-
- function panel1_onmouseover($sender, $param)
- {
- $this->label1->Text = 'panel 1 on mouse over '.time();
- }
-
- function button1_clicked($sender, $param)
- {
- $this->label1->Text = 'button 1 clicked';
- }
-}
-
+<?php + +class EventTriggeredCallback extends TPage +{ + function text1_focused($sender, $param) + { + $this->label1->Text = 'text 1 focused'; + } + + function panel1_onmouseover($sender, $param) + { + $this->label1->Text = 'panel 1 on mouse over '.time(); + } + + function button1_clicked($sender, $param) + { + $this->label1->Text = 'button 1 clicked'; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php index d31c10f6..e2ffbf07 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php +++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php @@ -1,53 +1,53 @@ -<?php
-
-class GerTurno2 extends TPage {
-
- private $_turnos = null;
-
-
- public function onLoad($param) {
- parent::onLoad($param);
-
- $this->loadTurnoOptions();
-
- if (!$this->IsPostBack) {
- $this->ativaModoEdicao();
- }
- }
-
-
- protected function loadTurnoOptions()
- {
- $this->DDropTurno->DataTextField="descricao";
- $this->DDropTurno->DataValueField="id";
- $this->_turnos = array(
- array('id' => 1, 'codigo'=>'test 1', 'descricao' => 'hello 1'),
- array('id' => 2, 'codigo'=>'test 2', 'descricao' => 'hello 2')
- );
- $this->DDropTurno->setDataSource($this->_turnos);
- $this->DDropTurno->dataBind();
- }
-
-
- protected function ativaModoEdicao() {
- $this->loadDadosTurno($this->DDropTurno->getSelectedValue());
- }
-
-
- protected function loadDadosTurno($id) {
- foreach ($this->_turnos as $key => $tur) {
- if ($tur['id'] == $id) {
- $this->Codigo->setText($tur['codigo']);
- $this->Descricao->setText($tur['descricao']);
- }
- }
- }
-
-
- public function trocaTurno($sender,$param) {
- $this->loadDadosTurno($sender->getSelectedValue());
- }
-
-}
-
+<?php + +class GerTurno2 extends TPage { + + private $_turnos = null; + + + public function onLoad($param) { + parent::onLoad($param); + + $this->loadTurnoOptions(); + + if (!$this->IsPostBack) { + $this->ativaModoEdicao(); + } + } + + + protected function loadTurnoOptions() + { + $this->DDropTurno->DataTextField="descricao"; + $this->DDropTurno->DataValueField="id"; + $this->_turnos = array( + array('id' => 1, 'codigo'=>'test 1', 'descricao' => 'hello 1'), + array('id' => 2, 'codigo'=>'test 2', 'descricao' => 'hello 2') + ); + $this->DDropTurno->setDataSource($this->_turnos); + $this->DDropTurno->dataBind(); + } + + + protected function ativaModoEdicao() { + $this->loadDadosTurno($this->DDropTurno->getSelectedValue()); + } + + + protected function loadDadosTurno($id) { + foreach ($this->_turnos as $key => $tur) { + if ($tur['id'] == $id) { + $this->Codigo->setText($tur['codigo']); + $this->Descricao->setText($tur['descricao']); + } + } + } + + + public function trocaTurno($sender,$param) { + $this->loadDadosTurno($sender->getSelectedValue()); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Home.php b/tests/FunctionalTests/active-controls/protected/pages/Home.php index 22b6528a..3dfb4bb0 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Home.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Home.php @@ -1,11 +1,11 @@ -<?php
-
-class Home extends TPage
-{
- public function btnTest_OnCallback($sender,$param)
- {
- $this->lblTest->Text = "Testing";
- }
-}
-
+<?php + +class Home extends TPage +{ + public function btnTest_OnCallback($sender,$param) + { + $this->lblTest->Text = "Testing"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php index e69ffdf2..c58a006a 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php +++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php @@ -1,13 +1,13 @@ -<?php
-
-class InPlaceWithValidator extends TPage
-{
- function button_valid($sender, $param){
-
- $this->status->Text = "Status: ". $this->Firstname->Text.".".$this->Lastname->Text;
-
- }
-
-}
-
+<?php + +class InPlaceWithValidator extends TPage +{ + function button_valid($sender, $param){ + + $this->status->Text = "Status: ". $this->Firstname->Text.".".$this->Lastname->Text; + + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.php index 1102ffb2..51e56d48 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.php @@ -1,22 +1,22 @@ -<?php
-
-class LargePageStateTest extends TPage
-{
- function onLoad($param)
- {
- parent::onLoad($param);
- for($i=0;$i<100;$i++) //may try 10000, but may crash PHP.
- {
- $label = new TLabel();
- $label->Text=" this is a very long label with some text $i:";
- $this->Panel1->Controls[] = $label;
- }
- }
-
- function button_clicked($sender, $param)
- {
- $this->status->Text .= ' Callback Clicked... ';
- }
-}
-
+<?php + +class LargePageStateTest extends TPage +{ + function onLoad($param) + { + parent::onLoad($param); + for($i=0;$i<100;$i++) //may try 10000, but may crash PHP. + { + $label = new TLabel(); + $label->Text=" this is a very long label with some text $i:"; + $this->Panel1->Controls[] = $label; + } + } + + function button_clicked($sender, $param) + { + $this->status->Text .= ' Callback Clicked... '; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.php b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.php index 3c3038c2..56f9c68f 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.php +++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.php @@ -1,22 +1,22 @@ -<?php
-
-class LargePageStateTest2 extends TPage
-{
- function onLoad($param)
- {
- parent::onLoad($param);
- for($i=0;$i<100;$i++) //may try 10000, but may crash PHP.
- {
- $label = new TLabel();
- $label->Text=" this is a very long label with some text $i:";
- $this->Panel1->Controls[] = $label;
- }
- }
-
- function button_clicked($sender, $param)
- {
- $this->status->Text .= ' Callback Clicked... ';
- }
-}
-
+<?php + +class LargePageStateTest2 extends TPage +{ + function onLoad($param) + { + parent::onLoad($param); + for($i=0;$i<100;$i++) //may try 10000, but may crash PHP. + { + $label = new TLabel(); + $label->Text=" this is a very long label with some text $i:"; + $this->Panel1->Controls[] = $label; + } + } + + function button_clicked($sender, $param) + { + $this->status->Text .= ' Callback Clicked... '; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Master1.php b/tests/FunctionalTests/active-controls/protected/pages/Master1.php index 173a59f0..1bbcb9c4 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Master1.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Master1.php @@ -1,7 +1,7 @@ -<?php
-
-class Master1 extends TTemplateControl
-{
-}
-
+<?php + +class Master1 extends TTemplateControl +{ +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php index 9a59713d..d3713308 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php @@ -1,16 +1,16 @@ -<?php
-
-class MessagesPanelTest extends TPage
-{
- function show_clicked($sender, $param)
- {
- $this->panel1->setMessage("hello world");
- }
-
- function hide_clicked($sender, $param)
- {
- $this->panel1->setMessage("");
- }
-}
-
+<?php + +class MessagesPanelTest extends TPage +{ + function show_clicked($sender, $param) + { + $this->panel1->setMessage("hello world"); + } + + function hide_clicked($sender, $param) + { + $this->panel1->setMessage(""); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyControl.php b/tests/FunctionalTests/active-controls/protected/pages/MyControl.php index 2c6b7f5b..5ced5d3a 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/MyControl.php +++ b/tests/FunctionalTests/active-controls/protected/pages/MyControl.php @@ -1,8 +1,8 @@ -<?php
-
-class MyControl extends TTemplateControl
-{
-
-}
-
+<?php + +class MyControl extends TTemplateControl +{ + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php index 723af42d..6736138d 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php @@ -1,42 +1,42 @@ -<?php
-
-class MyTabPanelTest extends TPage
-{
- private $panels = array('pnlContentsA', 'pnlContentsB', 'pnlContentsC', );
-
- private function showPanel($id, $param)
- {
- foreach($this->panels as $panel)
- {
- if($id == $panel)
- {
- $this->$panel->setAttribute('style', 'display: block;');
- $this->$panel->setVisible(true);
- $this->$panel->render($param->NewWriter);
- }
- else
- {
- $this->$panel->setVisible(false);
- }
- }
- }
-
- public function onShowPanelA($sender, $param)
- {
- $this->showPanel('pnlContentsA', $param);
- }
-
- public function onShowPanelB($sender, $param)
- {
- $this->showPanel('pnlContentsB', $param);
- }
-
- public function onShowPanelC($sender, $param)
- {
- $this->showPanel('pnlContentsC', $param);
- }
-}
-
-
-
+<?php + +class MyTabPanelTest extends TPage +{ + private $panels = array('pnlContentsA', 'pnlContentsB', 'pnlContentsC', ); + + private function showPanel($id, $param) + { + foreach($this->panels as $panel) + { + if($id == $panel) + { + $this->$panel->setAttribute('style', 'display: block;'); + $this->$panel->setVisible(true); + $this->$panel->render($param->NewWriter); + } + else + { + $this->$panel->setVisible(false); + } + } + } + + public function onShowPanelA($sender, $param) + { + $this->showPanel('pnlContentsA', $param); + } + + public function onShowPanelB($sender, $param) + { + $this->showPanel('pnlContentsB', $param); + } + + public function onShowPanelC($sender, $param) + { + $this->showPanel('pnlContentsC', $param); + } +} + + + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php index 0abd8eb5..f6e5071d 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php @@ -1,11 +1,11 @@ <?php -
-class NullStateTest extends TPage
-{
- public function btnTest_OnCallback($sender,$param)
- {
- $this->lblTest->Text = "Testing";
- }
-}
+ +class NullStateTest extends TPage +{ + public function btnTest_OnCallback($sender,$param) + { + $this->lblTest->Text = "Testing"; + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php index 022f6dad..8a1ba198 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php +++ b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php @@ -1,34 +1,34 @@ -<?php
-
-class PopulateActiveList extends TPage
-{
- public function populate_list1($sender, $param)
- {
- $data = array('Hello', 'World', 'Prado');
- $this->list1->Items->clear();
- for($i = 0,$k=count($data); $i<$k; $i++)
- {
- $item = new TListItem($data[$i], $i);
- $this->list1->Items[] = $item;
- }
- }
-
- public function populate_list2($sender, $param)
- {
- $data = array('Hello', 'World', 'Prado');
- $this->list2->Items->clear();
- for($i = 0,$k=count($data); $i<$k; $i++)
- {
- $item = new TListItem($data[$i], $i);
- $this->list2->Items[] = $item;
- }
- }
-
- public function list_changed($sender, $param)
- {
- $text = $sender->SelectedItem ? $sender->SelectedItem->Text : 'Not selected';
- $this->label1->Text = $sender->ID . ': '.$text;
- }
-}
-
+<?php + +class PopulateActiveList extends TPage +{ + public function populate_list1($sender, $param) + { + $data = array('Hello', 'World', 'Prado'); + $this->list1->Items->clear(); + for($i = 0,$k=count($data); $i<$k; $i++) + { + $item = new TListItem($data[$i], $i); + $this->list1->Items[] = $item; + } + } + + public function populate_list2($sender, $param) + { + $data = array('Hello', 'World', 'Prado'); + $this->list2->Items->clear(); + for($i = 0,$k=count($data); $i<$k; $i++) + { + $item = new TListItem($data[$i], $i); + $this->list2->Items[] = $item; + } + } + + public function list_changed($sender, $param) + { + $text = $sender->SelectedItem ? $sender->SelectedItem->Text : 'Not selected'; + $this->label1->Text = $sender->ID . ': '.$text; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php index 1257b45b..d22f2922 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php @@ -1,45 +1,45 @@ -<?php
-
-class PostLoadingTest extends TPage
-{
- public function onInit($param)
- {
- parent::onInit($param);
-
- // Text Box
- $textBox=new TTextBox();
- $textBox->setVisible(false);
- $textBox->setID("MyTextBox");
- $this->panel1->getControls()->add($textBox);
- $this->registerObject("MyTextBox", $textBox);
-
-
- // Submit button
- $button=new TActiveButton();
- $button->setVisible(false);
- $button->setID("MyButton");
- $button->setText("Submit");
- $button->attachEventHandler("OnCallback", array($this, "clickedButton"));
- $this->panel1->getControls()->add($button);
- $this->registerObject("MyButton", $button);
-
- }
-
-
- function callback1_requested($sender, $param)
- {
- $this->MyTextBox->visible = true;
- $this->MyButton->ActiveControl->EnableUpdate=false;
- $this->MyButton->visible = true;
- $this->panel1->render($param->NewWriter);
- }
-
- function clickedButton($sender, $param)
- {
- $this->panel1->getControls()->add('Result is '.$this->MyTextBox->getText());
- $this->panel1->render($param->NewWriter);
- $this->Page->CallbackClient->Highlight('heading');
- }
-}
-
+<?php + +class PostLoadingTest extends TPage +{ + public function onInit($param) + { + parent::onInit($param); + + // Text Box + $textBox=new TTextBox(); + $textBox->setVisible(false); + $textBox->setID("MyTextBox"); + $this->panel1->getControls()->add($textBox); + $this->registerObject("MyTextBox", $textBox); + + + // Submit button + $button=new TActiveButton(); + $button->setVisible(false); + $button->setID("MyButton"); + $button->setText("Submit"); + $button->attachEventHandler("OnCallback", array($this, "clickedButton")); + $this->panel1->getControls()->add($button); + $this->registerObject("MyButton", $button); + + } + + + function callback1_requested($sender, $param) + { + $this->MyTextBox->visible = true; + $this->MyButton->ActiveControl->EnableUpdate=false; + $this->MyButton->visible = true; + $this->panel1->render($param->NewWriter); + } + + function clickedButton($sender, $param) + { + $this->panel1->getControls()->add('Result is '.$this->MyTextBox->getText()); + $this->panel1->render($param->NewWriter); + $this->Page->CallbackClient->Highlight('heading'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php index 10c45aa3..eb77073b 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.php @@ -1,28 +1,28 @@ -<?php
-
-class RadioButtonListTest extends TPage
-{
- public function radChange($sender,$param){
- $choice = 'Choice : ';
- switch($this->rad_button_list->SelectedValue){
- case 'yes':
- $choice.='Yes :-)';
- break;
- case 'no':
- $choice.='No :-(';
- break;
- case 'whynot':
- $choice.='Why not ???';
- break;
- }
- $this->label->Text = $choice;
- }
-
- public function action($sender,$param){
- $this->label->Text = 'Action...';
- }
-
-}
-
-
+<?php + +class RadioButtonListTest extends TPage +{ + public function radChange($sender,$param){ + $choice = 'Choice : '; + switch($this->rad_button_list->SelectedValue){ + case 'yes': + $choice.='Yes :-)'; + break; + case 'no': + $choice.='No :-('; + break; + case 'whynot': + $choice.='Why not ???'; + break; + } + $this->label->Text = $choice; + } + + public function action($sender,$param){ + $this->label->Text = 'Action...'; + } + +} + + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.php b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php index 98b62e04..8fd879bc 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.php +++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php @@ -1,34 +1,34 @@ -<?php
-
-class RatingList extends TPage
-{
- function list1_oncallback($sender, $param)
- {
- $newRating = ($sender->Rating + $sender->SelectedIndex+1)/2;
- $sender->Rating = $newRating;
- $sender->Caption = "Rating : ".$newRating;
- $sender->Enabled=false;
- }
-
-
- function list2_oncallback($sender, $param)
- {
- }
-
- function button1_clicked($sender, $param)
- {
- $this->list1->Enabled = true;
- }
-
- function button2_clicked($sender, $param)
- {
- $this->list1->Enabled=false;
- }
-
- function button5_clicked($sender, $param)
- {
- $this->list1->SelectedIndex=3;
- }
-}
-
+<?php + +class RatingList extends TPage +{ + function list1_oncallback($sender, $param) + { + $newRating = ($sender->Rating + $sender->SelectedIndex+1)/2; + $sender->Rating = $newRating; + $sender->Caption = "Rating : ".$newRating; + $sender->Enabled=false; + } + + + function list2_oncallback($sender, $param) + { + } + + function button1_clicked($sender, $param) + { + $this->list1->Enabled = true; + } + + function button2_clicked($sender, $param) + { + $this->list1->Enabled=false; + } + + function button5_clicked($sender, $param) + { + $this->list1->SelectedIndex=3; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php index c5235dc6..013ffe61 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php +++ b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php @@ -1,61 +1,61 @@ -<?php
-
-class RepeaterWithActiveControls extends TPage
-{
- private $_data=array('Hello', 'World', 'Prado');
-
- private $_status='';
-
- public function onLoad($param)
- {
- parent::onLoad($param);
- if(!$this->IsCallback)
- {
- $this->repeater1->DataSource = $this->_data;
- $this->repeater1->dataBind();
- }
- }
-
- public function label_changed($sender, $param)
- {
- $index = $sender->getParent()->ItemIndex + 1;
- $this->_status .= " Update textbox {$index}: ".$sender->Text;
- }
-
- public function onPreRender($param)
- {
- parent::onPreRender($param);
- if(trim($this->_status))
- $this->label1->Text = $this->_status;
- }
-
- public function enable_edit($sender, $param)
- {
- if($this->update_button->Enabled==false)
- {
- for($i = 0; $i<count($this->repeater1->Items); $i++)
- {
- $textbox = $this->repeater1->Items[$i]->edit_box;
- $textbox->DisplayTextBox = true;
- }
- $this->update_button->Enabled = true;
- $sender->Enabled=false;
- }
- }
-
- public function disable_edit($sender, $param)
- {
- if($this->update_button->Enabled==true)
- {
- for($i = 0; $i<count($this->repeater1->Items); $i++)
- {
- $textbox = $this->repeater1->Items[$i]->edit_box;
- $textbox->DisplayTextBox = false;
- }
- $this->edit_button->Enabled = true;
- $sender->Enabled=false;
- }
- }
-}
-
+<?php + +class RepeaterWithActiveControls extends TPage +{ + private $_data=array('Hello', 'World', 'Prado'); + + private $_status=''; + + public function onLoad($param) + { + parent::onLoad($param); + if(!$this->IsCallback) + { + $this->repeater1->DataSource = $this->_data; + $this->repeater1->dataBind(); + } + } + + public function label_changed($sender, $param) + { + $index = $sender->getParent()->ItemIndex + 1; + $this->_status .= " Update textbox {$index}: ".$sender->Text; + } + + public function onPreRender($param) + { + parent::onPreRender($param); + if(trim($this->_status)) + $this->label1->Text = $this->_status; + } + + public function enable_edit($sender, $param) + { + if($this->update_button->Enabled==false) + { + for($i = 0; $i<count($this->repeater1->Items); $i++) + { + $textbox = $this->repeater1->Items[$i]->edit_box; + $textbox->DisplayTextBox = true; + } + $this->update_button->Enabled = true; + $sender->Enabled=false; + } + } + + public function disable_edit($sender, $param) + { + if($this->update_button->Enabled==true) + { + for($i = 0; $i<count($this->repeater1->Items); $i++) + { + $textbox = $this->repeater1->Items[$i]->edit_box; + $textbox->DisplayTextBox = false; + } + $this->edit_button->Enabled = true; + $sender->Enabled=false; + } + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php index a5358d98..a6df2abd 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.php @@ -1,42 +1,42 @@ -<?php
-
-class ReplaceContentTest extends TPage
-{
- function appendContent($sender, $param)
- {
- $this->CallbackClient->appendContent($this->subpanel, $this->replacementContent());
- }
-
- function prependContent($sender, $param)
- {
- $this->CallbackClient->prependContent($this->subpanel, $this->replacementContent());
- }
-
- function insertContentBefore($sender, $param)
- {
- $this->CallbackClient->insertContentBefore($this->subpanel, $this->replacementContent());
- }
-
- function insertContentAfter($sender, $param)
- {
- $this->CallbackClient->insertContentAfter($this->subpanel, $this->replacementContent());
- }
-
- function replaceContent($sender, $param)
- {
- $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;
- }
-}
-
+<?php + +class ReplaceContentTest extends TPage +{ + function appendContent($sender, $param) + { + $this->CallbackClient->appendContent($this->subpanel, $this->replacementContent()); + } + + function prependContent($sender, $param) + { + $this->CallbackClient->prependContent($this->subpanel, $this->replacementContent()); + } + + function insertContentBefore($sender, $param) + { + $this->CallbackClient->insertContentBefore($this->subpanel, $this->replacementContent()); + } + + function insertContentAfter($sender, $param) + { + $this->CallbackClient->insertContentAfter($this->subpanel, $this->replacementContent()); + } + + function replaceContent($sender, $param) + { + $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; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php index 4a488107..9d4a7695 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php @@ -1,13 +1,13 @@ -<?php
-
-class PageStateTest extends TPage
-{
- function button1_oncallback($sender, $param)
- {
- //sleep(rand(0,5));
- $sender->CustomData = $sender->CustomData + 1;
- $this->label1->Text = " button1 clicked ".$sender->CustomData." times";
- }
-}
-
+<?php + +class PageStateTest extends TPage +{ + function button1_oncallback($sender, $param) + { + //sleep(rand(0,5)); + $sender->CustomData = $sender->CustomData + 1; + $this->label1->Text = " button1 clicked ".$sender->CustomData." times"; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.php b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.php index 9b5a05f7..6cc5a500 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.php @@ -1,26 +1,26 @@ -<?php
-
-class TInPlaceTextBoxTest extends TPage
-{
- function load_text($sender, $param)
- {
- $sender->Text = "muahaha";
- }
-
- function label1_changed($sender, $param)
- {
- $this->status->Text = "Status: ". $sender->Text;
- }
-
- function button_clicked($sender, $param)
- {
- $this->label1->Text = "hahahaha";
- }
-
- function NewPackageSubject($sender, $param)
- {
- throw new TException('Exist');
- }
-}
-
+<?php + +class TInPlaceTextBoxTest extends TPage +{ + function load_text($sender, $param) + { + $sender->Text = "muahaha"; + } + + function label1_changed($sender, $param) + { + $this->status->Text = "Status: ". $sender->Text; + } + + function button_clicked($sender, $param) + { + $this->label1->Text = "hahahaha"; + } + + function NewPackageSubject($sender, $param) + { + throw new TException('Exist'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TestMasterPage.php b/tests/FunctionalTests/active-controls/protected/pages/TestMasterPage.php index dc643e52..170e618b 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/TestMasterPage.php +++ b/tests/FunctionalTests/active-controls/protected/pages/TestMasterPage.php @@ -1,7 +1,7 @@ -<?php
-
-class TestMasterPage extends TTemplateControl
-{
-}
-
+<?php + +class TestMasterPage extends TTemplateControl +{ +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.php b/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.php index cf43bccd..1d2cc92f 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.php +++ b/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.php @@ -1,11 +1,11 @@ -<?php
-
-class TextBoxValidationCallback extends TPage
-{
-
- function lookupZipCode()
- {
- $this->City->Text = "City: ".$this->Address->Text . ' Zip: '.$this->ZipCode->Text;
- }
-}
+<?php + +class TextBoxValidationCallback extends TPage +{ + + function lookupZipCode() + { + $this->City->Text = "City: ".$this->Address->Text . ' Zip: '.$this->ZipCode->Text; + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php index a8f83187..69985541 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php @@ -1,12 +1,12 @@ -<?php
-
-class ValueTriggerCallbackTest extends TPage
-{
- function text1_changed($sender, $param)
- {
- $values = $param->getCallbackParameter();
- $this->label1->Text = "Old = ".$values->OldValue." : New Value = ".$values->NewValue;
- }
-}
-
+<?php + +class ValueTriggerCallbackTest extends TPage +{ + function text1_changed($sender, $param) + { + $values = $param->getCallbackParameter(); + $this->label1->Text = "Old = ".$values->OldValue." : New Value = ".$values->NewValue; + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php index 7da7315c..0cf7d927 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php @@ -1,20 +1,20 @@ -<?php
-
-class ActiveControlExpressionTagTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('active-controls/index.php?page=ActiveControlExpressionTag');
- $this->assertTextPresent('Active Control With Expression Tag Test');
- $this->assertTextNotPresent('Text box content:');
-
- $this->type('textbox1', 'Hello world');
- $this->click('button1');
- $this->pause(800);
-
- $this->assertText('repeats', 'result - 1 result - two');
- $this->assertText('contents', 'Text box content: Hello world');
- }
-}
-
+<?php + +class ActiveControlExpressionTagTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('active-controls/index.php?page=ActiveControlExpressionTag'); + $this->assertTextPresent('Active Control With Expression Tag Test'); + $this->assertTextNotPresent('Text box content:'); + + $this->type('textbox1', 'Hello world'); + $this->click('button1'); + $this->pause(800); + + $this->assertText('repeats', 'result - 1 result - two'); + $this->assertText('contents', 'Text box content: Hello world'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php index d497e915..477f7fea 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php @@ -1,17 +1,17 @@ -<?php
-
-class ActiveImageButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ActiveImageButtonTest");
- $this->assertTextPresent("TActiveImageButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("image1");
- $this->pause(800);
- //unable to determine mouse position
- $this->assertTextPresent("regexp:Image clicked at x=\d+, y=\d+");
- }
-}
-
+<?php + +class ActiveImageButtonTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ActiveImageButtonTest"); + $this->assertTextPresent("TActiveImageButton Functional Test"); + $this->assertText("label1", "Label 1"); + $this->click("image1"); + $this->pause(800); + //unable to determine mouse position + $this->assertTextPresent("regexp:Image clicked at x=\d+, y=\d+"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php index 305a5c93..7024acd2 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php @@ -1,16 +1,16 @@ -<?php
-
-class ActiveLinkButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ActiveLinkButtonTest");
- $this->verifyTextPresent("TActiveLinkButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("button2");
- $this->pause(800);
- $this->assertText("label1", "Button 1 was clicked using callback!");
- }
-}
-
+<?php + +class ActiveLinkButtonTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ActiveLinkButtonTest"); + $this->verifyTextPresent("TActiveLinkButton Functional Test"); + $this->assertText("label1", "Label 1"); + $this->click("button2"); + $this->pause(800); + $this->assertText("label1", "Button 1 was clicked using callback!"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php index 7f006d9e..116dd4ad 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php @@ -1,49 +1,49 @@ -<?php
-
-class ActiveListBoxMasterTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ActiveListBoxMasterTest");
- $this->assertTextPresent('Active List Box Functional Test');
-
- $base = 'ctl0_body_';
-
- $this->assertText($base."label1", "Label 1");
-
- $this->click($base."button1");
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '1,2,3');
-
- $this->click($base.'button3');
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '0');
-
- $this->click($base.'button4');
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '4');
-
- $this->click($base.'button5');
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '1,4');
-
- $this->click($base.'button2');
- $this->pause(800);
- $this->assertEmptySelection($base."list1");
-
- $this->click($base.'button6');
- $this->pause(800);
- $this->click($base."button1");
- $this->pause(800);
- $this->assertSelectedIndexes($base.'list1', '1,2,3');
-
- $this->select($base."list1", "item 1");
- $this->pause(800);
- $this->assertText($base.'label1', 'Selection: value 1');
-
- $this->addSelection($base."list1", "item 4");
- $this->pause(800);
- $this->assertText($base.'label1', 'Selection: value 1, value 4');
- }
-}
+<?php + +class ActiveListBoxMasterTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ActiveListBoxMasterTest"); + $this->assertTextPresent('Active List Box Functional Test'); + + $base = 'ctl0_body_'; + + $this->assertText($base."label1", "Label 1"); + + $this->click($base."button1"); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '1,2,3'); + + $this->click($base.'button3'); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '0'); + + $this->click($base.'button4'); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '4'); + + $this->click($base.'button5'); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '1,4'); + + $this->click($base.'button2'); + $this->pause(800); + $this->assertEmptySelection($base."list1"); + + $this->click($base.'button6'); + $this->pause(800); + $this->click($base."button1"); + $this->pause(800); + $this->assertSelectedIndexes($base.'list1', '1,2,3'); + + $this->select($base."list1", "item 1"); + $this->pause(800); + $this->assertText($base.'label1', 'Selection: value 1'); + + $this->addSelection($base."list1", "item 4"); + $this->pause(800); + $this->assertText($base.'label1', 'Selection: value 1, value 4'); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php index 96f56b30..78dbd77e 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php @@ -1,47 +1,47 @@ -<?php
-
-class ActiveListBoxTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ActiveListBoxTest");
- $this->assertTextPresent('Active List Box Functional Test');
-
- $this->assertText("label1", "Label 1");
-
- $this->click("button1");
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '1,2,3');
-
- $this->click('button3');
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '0');
-
- $this->click('button4');
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '4');
-
- $this->click('button5');
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '1,4');
-
- $this->click('button2');
- $this->pause(800);
- $this->assertEmptySelection("list1");
-
- $this->click('button6');
- $this->pause(800);
- $this->click("button1");
- $this->pause(800);
- $this->assertSelectedIndexes('list1', '1,2,3');
-
- $this->select("list1", "item 1");
- $this->pause(800);
- $this->assertText('label1', 'Selection: value 1');
-
- $this->addSelection("list1", "item 4");
- $this->pause(800);
- $this->assertText('label1', 'Selection: value 1, value 4');
- }
-}
+<?php + +class ActiveListBoxTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ActiveListBoxTest"); + $this->assertTextPresent('Active List Box Functional Test'); + + $this->assertText("label1", "Label 1"); + + $this->click("button1"); + $this->pause(800); + $this->assertSelectedIndexes('list1', '1,2,3'); + + $this->click('button3'); + $this->pause(800); + $this->assertSelectedIndexes('list1', '0'); + + $this->click('button4'); + $this->pause(800); + $this->assertSelectedIndexes('list1', '4'); + + $this->click('button5'); + $this->pause(800); + $this->assertSelectedIndexes('list1', '1,4'); + + $this->click('button2'); + $this->pause(800); + $this->assertEmptySelection("list1"); + + $this->click('button6'); + $this->pause(800); + $this->click("button1"); + $this->pause(800); + $this->assertSelectedIndexes('list1', '1,2,3'); + + $this->select("list1", "item 1"); + $this->pause(800); + $this->assertText('label1', 'Selection: value 1'); + + $this->addSelection("list1", "item 4"); + $this->pause(800); + $this->assertText('label1', 'Selection: value 1, value 4'); + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php index ce269cd1..45078830 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php @@ -1,50 +1,50 @@ -<?php
-
-class ActiveRadioButtonListTestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $this->open("active-controls/index.php?page=ActiveRadioButtonListTest");
- $this->verifyTextPresent("TActiveRadioButtonList Test Case");
-
- $this->assertText("label1", "Label 1");
-
-
- $this->click("button3");
- $this->pause(800);
- $this->assertCheckBoxes(array(0));
-
- $this->click("button2");
- $this->pause(800);
- $this->assertCheckBoxes(array());
-
- $this->click("button4");
- $this->pause(800);
- $this->assertCheckBoxes(array(4));
-
- $this->click("list1_c2");
- $this->pause(800);
- $this->assertText("label1", "Selection: value 3");
-
- $this->click("list1_c3");
- $this->pause(800);
- $this->assertText("label1", "Selection: value 4");
-
- }
-
- function assertCheckBoxes($checks, $total = 5)
- {
- for($i = 0; $i < $total; $i++)
- {
- if(in_array($i, $checks))
- $this->assertChecked("list1_c{$i}");
- else
- $this->assertNotChecked("list1_c{$i}");
- }
- }
-}
-
+<?php + +class ActiveRadioButtonListTestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $this->open("active-controls/index.php?page=ActiveRadioButtonListTest"); + $this->verifyTextPresent("TActiveRadioButtonList Test Case"); + + $this->assertText("label1", "Label 1"); + + + $this->click("button3"); + $this->pause(800); + $this->assertCheckBoxes(array(0)); + + $this->click("button2"); + $this->pause(800); + $this->assertCheckBoxes(array()); + + $this->click("button4"); + $this->pause(800); + $this->assertCheckBoxes(array(4)); + + $this->click("list1_c2"); + $this->pause(800); + $this->assertText("label1", "Selection: value 3"); + + $this->click("list1_c3"); + $this->pause(800); + $this->assertText("label1", "Selection: value 4"); + + } + + function assertCheckBoxes($checks, $total = 5) + { + for($i = 0; $i < $total; $i++) + { + if(in_array($i, $checks)) + $this->assertChecked("list1_c{$i}"); + else + $this->assertNotChecked("list1_c{$i}"); + } + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php index 46925960..2991da9b 100644 --- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php @@ -1,57 +1,57 @@ -<?php
-
-class ActiveRadioButtonTestCase extends SeleniumTestCase
-{
- function test()
- {
- //problem with test runner clicking on radio buttons
- $this->skipBrowsers(self::OPERA);
-
- $this->open("active-controls/index.php?page=ActiveRadioButtonTest");
- $this->verifyTextPresent("Active Radio Button Test");
- $this->assertText('label1', 'Label 1');
-
- $this->assertNotChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
-
- $this->assertText('radio1_label', 'Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
-
- $this->click('change_text1');
- $this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
-
- $this->click('change_text2');
- $this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2 World');
- $this->assertText('radio3_label', 'Radio Button 3');
-
- $this->click('change_radio1');
- $this->pause(800);
- $this->assertChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
-
- $this->click('change_radio2');
- $this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertNotChecked('radio3');
-
-
- $this->click('radio3');
- $this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertChecked('radio3');
- $this->assertText('label1', 'Label 1:Radio Button 3 Checked');
-
-
- }
-}
+<?php + +class ActiveRadioButtonTestCase extends SeleniumTestCase +{ + function test() + { + //problem with test runner clicking on radio buttons + $this->skipBrowsers(self::OPERA); + + $this->open("active-controls/index.php?page=ActiveRadioButtonTest"); + $this->verifyTextPresent("Active Radio Button Test"); + $this->assertText('label1', 'Label 1'); + + $this->assertNotChecked('radio1'); + $this->assertNotChecked('radio2'); + $this->assertNotChecked('radio3'); + + $this->assertText('radio1_label', 'Radio Button 1'); + $this->assertText('radio2_label', 'Radio Button 2'); + $this->assertText('radio3_label', 'Radio Button 3'); + + $this->click('change_text1'); + $this->pause(800); + $this->assertText('radio1_label', 'Hello Radio Button 1'); + $this->assertText('radio2_label', 'Radio Button 2'); + $this->assertText('radio3_label', 'Radio Button 3'); + + $this->click('change_text2'); + $this->pause(800); + $this->assertText('radio1_label', 'Hello Radio Button 1'); + $this->assertText('radio2_label', 'Radio Button 2 World'); + $this->assertText('radio3_label', 'Radio Button 3'); + + $this->click('change_radio1'); + $this->pause(800); + $this->assertChecked('radio1'); + $this->assertNotChecked('radio2'); + $this->assertNotChecked('radio3'); + + $this->click('change_radio2'); + $this->pause(800); + $this->assertNotChecked('radio1'); + $this->assertChecked('radio2'); + $this->assertNotChecked('radio3'); + + + $this->click('radio3'); + $this->pause(800); + $this->assertNotChecked('radio1'); + $this->assertChecked('radio2'); + $this->assertChecked('radio3'); + $this->assertText('label1', 'Label 1:Radio Button 3 Checked'); + + + } +} ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php index 9cde186a..59bc2e93 100644 --- a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class CustomTemplateTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('active-controls/index.php?page=CustomTemplateControlTest');
- $this->assertTextPresent('Add Dynamic Custom TTemplateControl Test');
- $this->assertText('label1', 'Label 1');
-
- $this->type('foo', 'Foo Bar!');
- $this->click('button2');
- $this->pause(800);
-
- $this->assertVisible('ctl1_ThePanel');
- $this->assertTextPresent('Client ID: ctl1_ThePanel');
-
- $this->assertText('label1', 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!');
- }
-}
-
+<?php + +class CustomTemplateTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('active-controls/index.php?page=CustomTemplateControlTest'); + $this->assertTextPresent('Add Dynamic Custom TTemplateControl Test'); + $this->assertText('label1', 'Label 1'); + + $this->type('foo', 'Foo Bar!'); + $this->click('button2'); + $this->pause(800); + + $this->assertVisible('ctl1_ThePanel'); + $this->assertTextPresent('Client ID: ctl1_ThePanel'); + + $this->assertText('label1', 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php index 3653dae1..c5367612 100644 --- a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class DelayedCallbackTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=DelayedCallback");
- $this->verifyTextPresent("Delayed Callback Test");
-
- $this->assertText("status", "");
- $this->click("button1");
- $this->click("button2");
-
- $this->pause("5000");
- $this->assertText("status", "Callback 1 returned after 4s");
- $this->pause("3000");
- $this->assertText("status", "Callback 2 delayed 2s");
-
- }
-}
-
+<?php + +class DelayedCallbackTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=DelayedCallback"); + $this->verifyTextPresent("Delayed Callback Test"); + + $this->assertText("status", ""); + $this->click("button1"); + $this->click("button2"); + + $this->pause("5000"); + $this->assertText("status", "Callback 1 returned after 4s"); + $this->pause("3000"); + $this->assertText("status", "Callback 2 delayed 2s"); + + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php index 8e400b5b..dc10bd28 100644 --- a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class EventTriggerTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=EventTriggeredCallback");
- $this->verifyTextPresent("Event Triggered Callback Test");
-
- $this->assertText('label1', 'Label 1');
-
- $this->click('button1');
- $this->pause(800);
- $this->assertText('label1', 'button 1 clicked');
-
- $this->type('text1', 'test');
- $this->pause(800);
- $this->assertText('label1', 'text 1 focused');
- }
-}
-
+<?php + +class EventTriggerTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=EventTriggeredCallback"); + $this->verifyTextPresent("Event Triggered Callback Test"); + + $this->assertText('label1', 'Label 1'); + + $this->click('button1'); + $this->pause(800); + $this->assertText('label1', 'button 1 clicked'); + + $this->type('text1', 'test'); + $this->pause(800); + $this->assertText('label1', 'text 1 focused'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php index 4929b879..25a6fde5 100644 --- a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php @@ -1,25 +1,25 @@ -<?php
-
-class PopulateListTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=PopulateActiveList");
- $this->verifyTextPresent("Populate active list controls");
- $this->assertText("label1", "");
-
- $this->click("button1");
- $this->pause(800);
- $this->select("list1", "World");
- $this->pause(800);
- $this->assertText("label1", "list1: World");
-
- $this->click("button2");
- $this->pause(800);
- $this->select("list2", "Prado");
- $this->pause(800);
- $this->assertText("label1", "list2: Prado");
- }
-}
-
+<?php + +class PopulateListTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=PopulateActiveList"); + $this->verifyTextPresent("Populate active list controls"); + $this->assertText("label1", ""); + + $this->click("button1"); + $this->pause(800); + $this->select("list1", "World"); + $this->pause(800); + $this->assertText("label1", "list1: World"); + + $this->click("button2"); + $this->pause(800); + $this->select("list2", "Prado"); + $this->pause(800); + $this->assertText("label1", "list2: Prado"); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php index 3b4d0ce9..0fa95b4d 100644 --- a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class PostLoadingTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open('active-controls/index.php?page=PostLoadingTest');
- $this->assertTextPresent('PostLoading Test');
-
- $this->assertTextNotPresent('Hello World');
-
- $this->click('div1');
- $this->pause(800);
- $this->type('MyTextBox', 'Hello World');
- $this->click('MyButton');
-
- $this->pause(800);
- $this->assertTextPresent('Result is Hello World');
- }
-}
-
+<?php + +class PostLoadingTestCase extends SeleniumTestCase +{ + function test() + { + $this->open('active-controls/index.php?page=PostLoadingTest'); + $this->assertTextPresent('PostLoading Test'); + + $this->assertTextNotPresent('Hello World'); + + $this->click('div1'); + $this->pause(800); + $this->type('MyTextBox', 'Hello World'); + $this->click('MyButton'); + + $this->pause(800); + $this->assertTextPresent('Result is Hello World'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php index b90607e6..910b1063 100644 --- a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php @@ -1,95 +1,95 @@ -<?php
-
-class ReplaceContentTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->skipBrowsers(self::INTERNET_EXPLORER);
-
- $this->open('active-controls/index.php?page=ReplaceContentTest');
- $this->assertTextPresent('Callback Replace Content Test');
-
- $this->assertText('subpanel', 'Sub Panel');
- $this->assertText('panel1', 'Main Panel Sub Panel');
-
- $this->type('content', 'something');
-
- $this->click('btn_append');
- $this->pause(800);
-
- $this->assertText('subpanel', 'Sub Panel something');
- $this->assertText('panel1', 'Main Panel Sub Panel something');
-
- $this->type('content', 'more');
- $this->click('btn_prepend');
- $this->pause(800);
-
- $this->assertText('subpanel', 'more Sub Panel something');
- $this->assertText('panel1', 'Main Panel more Sub Panel something');
-
-
- $this->type('content', 'prado');
- $this->click('btn_before');
- $this->pause(800);
-
- $this->assertText('subpanel', 'more Sub Panel something');
- $this->assertText('panel1', 'Main Panel pradomore Sub Panel something');
-
- $this->type('content', ' php ');
- $this->click('btn_after');
- $this->pause(800);
-
- $this->type('content', 'mauahahaha');
- $this->click('btn_replace');
- $this->pause(1000);
-
- $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
- }
-
- function testIE()
- {
- $this->targetBrowsers(self::INTERNET_EXPLORER);
-
- $this->open('active-controls/index.php?page=ReplaceContentTest');
- $this->assertTextPresent('Callback Replace Content Test');
-
- $this->assertText('subpanel', 'Sub Panel');
- $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel');
-
- $this->type('content', 'something');
-
- $this->click('btn_append');
- $this->pause(800);
-
- $this->assertText('subpanel', 'Sub Panel something');
- $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel\s*something');
-
- $this->type('content', 'more');
- $this->click('btn_prepend');
- $this->pause(800);
-
- $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something');
- $this->assertText('panel1', 'regexp:Main Panel\s*moreSub Panel\s*something');
-
-
- $this->type('content', 'prado');
- $this->click('btn_before');
- $this->pause(800);
-
- $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something');
- $this->assertText('panel1', 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something');
-
- $this->type('content', ' php ');
- $this->click('btn_after');
- $this->pause(800);
-
- $this->type('content', 'mauahahaha');
- $this->click('btn_replace');
- $this->pause(1000);
-
- $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
- }
-
-}
-
+<?php + +class ReplaceContentTestCase extends SeleniumTestCase +{ + function test() + { + $this->skipBrowsers(self::INTERNET_EXPLORER); + + $this->open('active-controls/index.php?page=ReplaceContentTest'); + $this->assertTextPresent('Callback Replace Content Test'); + + $this->assertText('subpanel', 'Sub Panel'); + $this->assertText('panel1', 'Main Panel Sub Panel'); + + $this->type('content', 'something'); + + $this->click('btn_append'); + $this->pause(800); + + $this->assertText('subpanel', 'Sub Panel something'); + $this->assertText('panel1', 'Main Panel Sub Panel something'); + + $this->type('content', 'more'); + $this->click('btn_prepend'); + $this->pause(800); + + $this->assertText('subpanel', 'more Sub Panel something'); + $this->assertText('panel1', 'Main Panel more Sub Panel something'); + + + $this->type('content', 'prado'); + $this->click('btn_before'); + $this->pause(800); + + $this->assertText('subpanel', 'more Sub Panel something'); + $this->assertText('panel1', 'Main Panel pradomore Sub Panel something'); + + $this->type('content', ' php '); + $this->click('btn_after'); + $this->pause(800); + + $this->type('content', 'mauahahaha'); + $this->click('btn_replace'); + $this->pause(1000); + + $this->assertText('panel1', 'Main Panel pradomauahahahaphp'); + } + + function testIE() + { + $this->targetBrowsers(self::INTERNET_EXPLORER); + + $this->open('active-controls/index.php?page=ReplaceContentTest'); + $this->assertTextPresent('Callback Replace Content Test'); + + $this->assertText('subpanel', 'Sub Panel'); + $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel'); + + $this->type('content', 'something'); + + $this->click('btn_append'); + $this->pause(800); + + $this->assertText('subpanel', 'Sub Panel something'); + $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel\s*something'); + + $this->type('content', 'more'); + $this->click('btn_prepend'); + $this->pause(800); + + $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something'); + $this->assertText('panel1', 'regexp:Main Panel\s*moreSub Panel\s*something'); + + + $this->type('content', 'prado'); + $this->click('btn_before'); + $this->pause(800); + + $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something'); + $this->assertText('panel1', 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something'); + + $this->type('content', ' php '); + $this->click('btn_after'); + $this->pause(800); + + $this->type('content', 'mauahahaha'); + $this->click('btn_replace'); + $this->pause(1000); + + $this->assertText('panel1', 'Main Panel pradomauahahahaphp'); + } + +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php index aff9a1b2..0fa0c982 100644 --- a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php @@ -1,24 +1,24 @@ -<?php
-
-class TextBoxGroupValidationTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=TextBoxValidationCallback");
- $this->assertTextPresent('TextBox AutoPostBack With Group Validation');
- $this->assertNotVisible('validator1');
-
- $this->type('ZipCode', 'test');
- $this->assertVisible('validator1');
-
- $this->type('Address', 'Sydney');
- $this->type('ZipCode', '2000');
-
- $this->assertNotVisible('validator1');
-
- $this->pause(800);
- $this->assertValue('City', 'City: Sydney Zip: 2000');
- }
-}
-
+<?php + +class TextBoxGroupValidationTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=TextBoxValidationCallback"); + $this->assertTextPresent('TextBox AutoPostBack With Group Validation'); + $this->assertNotVisible('validator1'); + + $this->type('ZipCode', 'test'); + $this->assertVisible('validator1'); + + $this->type('Address', 'Sydney'); + $this->type('ZipCode', '2000'); + + $this->assertNotVisible('validator1'); + + $this->pause(800); + $this->assertValue('City', 'City: Sydney Zip: 2000'); + } +} + ?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php index f98fc4a8..5d2e954c 100644 --- a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php @@ -1,22 +1,22 @@ -<?php
-
-class ValueTriggerTestCase extends SeleniumTestCase
-{
- function test()
- {
- $this->open("active-controls/index.php?page=ValueTriggerCallbackTest");
- $this->verifyTextPresent("Value Trigger Callback Test");
-
- $this->assertText('label1', 'Label 1');
-
- $this->type('text1', 'test');
- $this->pause(2000);
- $this->assertText('label1', 'Old = : New Value = test');
-
- $this->type('text1', 'more');
- $this->pause(3000);
- $this->assertText('label1', 'Old = test : New Value = more');
- }
-}
-
+<?php + +class ValueTriggerTestCase extends SeleniumTestCase +{ + function test() + { + $this->open("active-controls/index.php?page=ValueTriggerCallbackTest"); + $this->verifyTextPresent("Value Trigger Callback Test"); + + $this->assertText('label1', 'Label 1'); + + $this->type('text1', 'test'); + $this->pause(2000); + $this->assertText('label1', 'Old = : New Value = test'); + + $this->type('text1', 'more'); + $this->pause(3000); + $this->assertText('label1', 'Old = test : New Value = more'); + } +} + ?>
\ No newline at end of file |