From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- .../pages/ActiveControls/ActiveControl.php | 86 ++++++++++----------- .../pages/ActiveControls/AutoComplete.php | 66 ++++++++-------- .../protected/pages/ActiveControls/Calculator.php | 28 +++---- .../protected/pages/ActiveControls/Calculator2.php | 38 +++++----- .../pages/ActiveControls/VisibleUpdate.php | 70 ++++++++--------- .../features/protected/pages/FeatureList.php | 66 ++++++++-------- .../features/protected/pages/FocusControl.php | 32 ++++---- .../features/protected/pages/I18N/BasicI18N.php | 88 +++++++++++----------- .../features/protected/pages/MyJavascriptLib.php | 62 +++++++-------- .../features/protected/pages/TestComp.php | 38 +++++----- .../protected/pages/myscripts/packages.php | 18 ++--- 11 files changed, 296 insertions(+), 296 deletions(-) (limited to 'tests/FunctionalTests/features/protected/pages') diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php index b2dd2233..322f4db7 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php @@ -1,43 +1,43 @@ -label1->setText("The time is ".time()." from ".$sender->ID); - $this->label1->setForeColor($this->getColor()); - $this->label1->renderControl($param->getOutput()); - - $this->button2->setEnabled(true); - - $this->panel2->setVisible(true); - $this->panel1->setBackColor($this->getColor()); - $this->panel1->renderControl($param->getOutput()); - $this->getCallbackClient()->shake($this->panel1); - } - - public function onButtonClicked($sender, $param) - { - $this->label2->setText("Muahaha !!! the time is ".time()." from ".$sender->ID); - } - - public function fastResponse($sender, $param) - { - $this->button2->setEnabled(false); - $style['color'] = $this->getColor(); - $this->getCallbackClient()->setStyle($this->label2, $style); - $this->getCallbackClient()->shake($this->label2); - } - - private function getColor() - { - return self::$_colors[rand(0,count(self::$_colors)-1)]; - } -} -?> +label1->setText("The time is ".time()." from ".$sender->ID); + $this->label1->setForeColor($this->getColor()); + $this->label1->renderControl($param->getOutput()); + + $this->button2->setEnabled(true); + + $this->panel2->setVisible(true); + $this->panel1->setBackColor($this->getColor()); + $this->panel1->renderControl($param->getOutput()); + $this->getCallbackClient()->shake($this->panel1); + } + + public function onButtonClicked($sender, $param) + { + $this->label2->setText("Muahaha !!! the time is ".time()." from ".$sender->ID); + } + + public function fastResponse($sender, $param) + { + $this->button2->setEnabled(false); + $style['color'] = $this->getColor(); + $this->getCallbackClient()->setStyle($this->label2, $style); + $this->getCallbackClient()->shake($this->label2); + } + + private function getColor() + { + return self::$_colors[rand(0,count(self::$_colors)-1)]; + } +} +?> diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php index 3474234e..ac08e4ed 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php @@ -1,34 +1,34 @@ -setDataSource($this->matchCountries($param->getParameter())); - $sender->dataBind(); - $sender->render($param->getOutput()); - } - - protected function matchCountries($token) - { - $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en'); - $list = array(); - $count = 0; - $token = strtolower($token); - foreach($info->getCountries() as $country) - { - if(strpos(strtolower($country), $token) === 0) - { - $list[] = $country; - $count++; - if($count > 10) break; - } - } - return $list; - } -} - +setDataSource($this->matchCountries($param->getParameter())); + $sender->dataBind(); + $sender->render($param->getOutput()); + } + + protected function matchCountries($token) + { + $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en'); + $list = array(); + $count = 0; + $token = strtolower($token); + foreach($info->getCountries() as $country) + { + if(strpos(strtolower($country), $token) === 0) + { + $list[] = $country; + $count++; + if($count > 10) break; + } + } + return $list; + } +} + ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php index 9821d8c9..7afd1d59 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php @@ -1,15 +1,15 @@ -c->Text = floatval($this->a->Text) + floatval($this->b->Text); - } -} - +c->Text = floatval($this->a->Text) + floatval($this->b->Text); + } +} + ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php index df07440f..3789a3f9 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php @@ -1,20 +1,20 @@ -c->Text = floatval($this->a->Text) + floatval($this->b->Text); - } - - public function update_callback($sender, $param) - { - $this->do_sum($this->sum, null); - $this->panel1->renderControl($param->Output); - } -} - +c->Text = floatval($this->a->Text) + floatval($this->b->Text); + } + + public function update_callback($sender, $param) + { + $this->do_sum($this->sum, null); + $this->panel1->renderControl($param->Output); + } +} + ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php index 0c9b16d5..1b1d0cbc 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php @@ -1,36 +1,36 @@ -label1->setText($this->getButtonState($sender)); - - //$this->button1->setEnabled(false); - $this->button1->setVisible(false); - // $this->button2->setEnabled(true); - $this->button2->setVisible(true); - } - - function click2($sender) - { - $this->label1->setText($this->getButtonState($sender)); - - // $this->button1->setEnabled(true); - $this->button1->setVisible(true); - /// $this->button2->setEnabled(false); - $this->button2->setVisible(false); - } - - protected function getButtonState($button) - { - return "Before you clicked on ".$button->Text. - ", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled'). - " and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled'); - } -} - +label1->setText($this->getButtonState($sender)); + + //$this->button1->setEnabled(false); + $this->button1->setVisible(false); + // $this->button2->setEnabled(true); + $this->button2->setVisible(true); + } + + function click2($sender) + { + $this->label1->setText($this->getButtonState($sender)); + + // $this->button1->setEnabled(true); + $this->button1->setVisible(true); + /// $this->button2->setEnabled(false); + $this->button2->setVisible(false); + } + + protected function getButtonState($button) + { + return "Before you clicked on ".$button->Text. + ", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled'). + " and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled'); + } +} + ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/FeatureList.php b/tests/FunctionalTests/features/protected/pages/FeatureList.php index 7f82d34e..8f28f6de 100644 --- a/tests/FunctionalTests/features/protected/pages/FeatureList.php +++ b/tests/FunctionalTests/features/protected/pages/FeatureList.php @@ -1,34 +1,34 @@ -getPageList(dirname(__FILE__),''); - $this->List->DataSource=$list; - $this->List->dataBind(); - } - - protected function getPageList($directory,$basePath) - { - $list=array(); - $folder=@opendir($directory); - while($entry=@readdir($folder)) - { - if($entry[0]==='.') - continue; - else if(is_file($directory.'/'.$entry)) - { - if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false) - $list['?page='.$basePath.$page]=$basePath.$page; - } - else - $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.')); - } - closedir($folder); - return $list; - } -} - +getPageList(dirname(__FILE__),''); + $this->List->DataSource=$list; + $this->List->dataBind(); + } + + protected function getPageList($directory,$basePath) + { + $list=array(); + $folder=@opendir($directory); + while($entry=@readdir($folder)) + { + if($entry[0]==='.') + continue; + else if(is_file($directory.'/'.$entry)) + { + if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false) + $list['?page='.$basePath.$page]=$basePath.$page; + } + else + $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.')); + } + closedir($folder); + return $list; + } +} + ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/FocusControl.php b/tests/FunctionalTests/features/protected/pages/FocusControl.php index d78f28c4..e534a92a 100644 --- a/tests/FunctionalTests/features/protected/pages/FocusControl.php +++ b/tests/FunctionalTests/features/protected/pages/FocusControl.php @@ -1,17 +1,17 @@ -list->SelectedIndex; - if($selected >= 0) - { - $id = "button".($selected+1); - $controlID = $this->{$id}->ClientID; - $this->ClientScript->registerFocusControl($controlID); - } - } -} - +list->SelectedIndex; + if($selected >= 0) + { + $id = "button".($selected+1); + $controlID = $this->{$id}->ClientID; + $this->ClientScript->registerFocusControl($controlID); + } + } +} + ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php index cac0a04e..929e2f17 100644 --- a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php +++ b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php @@ -1,45 +1,45 @@ - - * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ - * @package ${package} - */ -class BasicI18N extends TPage -{ -} - -/** - * ${classname} - * - * ${description} - * - * @author Wei Zhuo - * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ - * @package ${package} - *//* -class BasicI18NTestCase extends SeleniumTestCase -{ - function setup() - { - $page = Prado::getApplication()->getTestPage(__FILE__); - $this->open($page); - } - - function testI18N() - { - $this->verifyTitle("Basic I18N Test", ""); - $this->verifyTextPresent("Hello", ""); - $this->verifyTextPresent("US$10,000.00", ""); - $this->verifyTextPresent("2006年1月15日 上午12时00分00秒", ""); - $this->verifyTextPresent("None", ""); - $this->verifyTextPresent("One thing.", ""); - $this->verifyTextPresent("Many things.", ""); - } -} -*/ + + * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ + * @package ${package} + */ +class BasicI18N extends TPage +{ +} + +/** + * ${classname} + * + * ${description} + * + * @author Wei Zhuo + * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ + * @package ${package} + *//* +class BasicI18NTestCase extends SeleniumTestCase +{ + function setup() + { + $page = Prado::getApplication()->getTestPage(__FILE__); + $this->open($page); + } + + function testI18N() + { + $this->verifyTitle("Basic I18N Test", ""); + $this->verifyTextPresent("Hello", ""); + $this->verifyTextPresent("US$10,000.00", ""); + $this->verifyTextPresent("2006年1月15日 上午12时00分00秒", ""); + $this->verifyTextPresent("None", ""); + $this->verifyTextPresent("One thing.", ""); + $this->verifyTextPresent("Many things.", ""); + } +} +*/ ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/MyJavascriptLib.php b/tests/FunctionalTests/features/protected/pages/MyJavascriptLib.php index 964b48a5..72e6061e 100644 --- a/tests/FunctionalTests/features/protected/pages/MyJavascriptLib.php +++ b/tests/FunctionalTests/features/protected/pages/MyJavascriptLib.php @@ -1,32 +1,32 @@ -_manager = $owner->getClientScript(); - $owner->onPreRenderComplete = array($this, 'registerScriptLoader'); - } - - public static function registerPackage(TControl $control, $name) - { - static $instance; - if($instance===null) - $instance=new self($control->getPage()); - $instance->_packages[$name]=true; - } - - protected function registerScriptLoader() - { - $dir = dirname(__FILE__).'/myscripts'; //contains my javascript files - $scripts = array_keys($this->_packages); - $url = $this->_manager->registerJavascriptPackages($dir, $scripts); - $this->_manager->registerScriptFile($url,$url); - } -} - +_manager = $owner->getClientScript(); + $owner->onPreRenderComplete = array($this, 'registerScriptLoader'); + } + + public static function registerPackage(TControl $control, $name) + { + static $instance; + if($instance===null) + $instance=new self($control->getPage()); + $instance->_packages[$name]=true; + } + + protected function registerScriptLoader() + { + $dir = dirname(__FILE__).'/myscripts'; //contains my javascript files + $scripts = array_keys($this->_packages); + $url = $this->_manager->registerJavascriptPackages($dir, $scripts); + $this->_manager->registerScriptFile($url,$url); + } +} + ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/TestComp.php b/tests/FunctionalTests/features/protected/pages/TestComp.php index f9d02c77..0358357a 100644 --- a/tests/FunctionalTests/features/protected/pages/TestComp.php +++ b/tests/FunctionalTests/features/protected/pages/TestComp.php @@ -1,20 +1,20 @@ -_class=$value; - } - - public function onPreRender($param) - { - parent::onPreRender($param); - MyJavascriptLib::registerPackage($this,$this->_class); - } -} - +_class=$value; + } + + public function onPreRender($param) + { + parent::onPreRender($param); + MyJavascriptLib::registerPackage($this,$this->_class); + } +} + ?> \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/myscripts/packages.php b/tests/FunctionalTests/features/protected/pages/myscripts/packages.php index 41561a71..e39199f9 100644 --- a/tests/FunctionalTests/features/protected/pages/myscripts/packages.php +++ b/tests/FunctionalTests/features/protected/pages/myscripts/packages.php @@ -1,10 +1,10 @@ - \ No newline at end of file -- cgit v1.2.3