From ebba13ebd9566215910897f29b31464f2c65f6b6 Mon Sep 17 00:00:00 2001 From: tof <> Date: Tue, 17 Jul 2007 08:02:49 +0000 Subject: Add functional test for Ticket656 --- .../tickets/protected/pages/Ticket656.page | 7 ++++++ .../tickets/protected/pages/Ticket656.php | 9 ++++++++ .../tickets/tests/Ticket656TestCase.php | 25 ++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket656.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket656.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket656TestCase.php (limited to 'tests/FunctionalTests/tickets') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket656.page b/tests/FunctionalTests/tickets/protected/pages/Ticket656.page new file mode 100644 index 00000000..aa5d11b2 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket656.page @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket656.php b/tests/FunctionalTests/tickets/protected/pages/Ticket656.php new file mode 100644 index 00000000..943908c9 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket656.php @@ -0,0 +1,9 @@ +lblStatus->setText($this->datePicker->getDate()); + } +} +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php new file mode 100644 index 00000000..df77334b --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php @@ -0,0 +1,25 @@ +open('tickets/index.php?page=Ticket656'); + $this->assertTitle("Verifying Ticket 656"); + + // First test, current date + $this->click($base."btnUpdate"); + $this->pause(800); + $this->assertText($base."lblStatus",date("d-m-Y")); + + // Then, set another date + $this->select($base."datePicker_day",20); + $this->select($base."datePicker_month", 10); + $this->select($base."datePicker_year", 2008); + $this->click($base."btnUpdate"); + $this->pause(800); + $this->assertText($base."lblStatus",date("d-m-Y", mktime(0,0,0,10,20,2008))); + } + +} +?> \ No newline at end of file -- cgit v1.2.3