From f35d43399a9ce03f08ffa326812bc5ed6764ef9e Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Mon, 10 Feb 2014 09:41:31 +0100 Subject: Ported some tests to jQuery --- .../protected/pages/GettingStarted/Upgrading32.page | 5 +++++ .../protected/pages/NestedActiveControls.page | 16 +++++++--------- .../protected/pages/PostLoadingTest.page | 18 +++++++----------- .../tickets/protected/pages/Ticket785.page | 16 ++++++++-------- .../tickets/protected/pages/Ticket897.php | 4 ++-- tests/test_tools/phpunit_bootstrap.php | 2 ++ 6 files changed, 31 insertions(+), 30 deletions(-) diff --git a/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page b/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page index 4417c668..4124e59e 100644 --- a/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page +++ b/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page @@ -148,6 +148,11 @@ The number one rule on writing jQuery javascript code is to read the - + + jQuery( document ).ready(function() { + jQuery("#div1").click(function() { + Prado.Callback("<%= $this->callback1->UniqueID %>"); + }); + }); + diff --git a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page index 885b368f..9ae1dca2 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page @@ -8,15 +8,11 @@
Click Me!
- - - + + jQuery( document ).ready(function() { + jQuery("#div1").click(function() { + Prado.Callback("<%= $this->callback1->UniqueID %>"); + }); + }); + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket785.page b/tests/FunctionalTests/tickets/protected/pages/Ticket785.page index 1b402a17..cd5a8783 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket785.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket785.page @@ -1,20 +1,20 @@ - - + + - $('selDate').innerHTML=parameter; - + $('#selDate').html(parameter); +

Client Side Selected date :

- + - $('selDate2').innerHTML=parameter; - + $('#selDate2').html(parameter); +

Client Side Selected date : -

+

\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket897.php b/tests/FunctionalTests/tickets/protected/pages/Ticket897.php index 358572bc..ec39d1b7 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket897.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket897.php @@ -1,8 +1,8 @@ Output->Text = date('Y-m-d', $this->Date->TimeStamp); } - + } diff --git a/tests/test_tools/phpunit_bootstrap.php b/tests/test_tools/phpunit_bootstrap.php index 23e25a1c..4357f99f 100644 --- a/tests/test_tools/phpunit_bootstrap.php +++ b/tests/test_tools/phpunit_bootstrap.php @@ -13,6 +13,8 @@ set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path()); // coverage tests waste a lot of memory! ini_set('memory_limit', '1G'); +date_default_timezone_set('UTC'); + if (!@include_once VENDOR_DIR.'/autoload.php') { die('You must set up the project dependencies, run the following commands: wget http://getcomposer.org/composer.phar -- cgit v1.2.3