summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes4
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.page13
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php31
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket703/config.xml15
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket703TestCase.php21
5 files changed, 84 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index a440edee..b13ebf41 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2948,6 +2948,9 @@ tests/FunctionalTests/tickets/protected/pages/Ticket679.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket679.php -text
tests/FunctionalTests/tickets/protected/pages/Ticket68.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket691.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php -text
+tests/FunctionalTests/tickets/protected/pages/Ticket703/config.xml -text
tests/FunctionalTests/tickets/protected/pages/Ticket72.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket72.php -text
tests/FunctionalTests/tickets/protected/pages/Ticket93.page -text
@@ -3006,6 +3009,7 @@ tests/FunctionalTests/tickets/tests/Ticket592TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket653TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket659TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket700TestCase.php -text
+tests/FunctionalTests/tickets/tests/Ticket703TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket72TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket93TestCase.php -text
tests/FunctionalTests/validators.php -text
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.page b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.page
new file mode 100644
index 00000000..4ca02ef5
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.page
@@ -0,0 +1,13 @@
+<com:TContent id="Content">
+<p>
+Type some content which will be logged :
+<com:TActiveTextBox id="logMessage"/>
+<com:TActiveButton Text="Add to logfile" OnClick="addLog"/>
+</p>
+<p>
+<com:TActiveTextBox TextMode="MultiLine" id="logBox" ReadOnly="true" Rows="5" Columns="80"/>
+</pre>
+</p>
+<com:TActiveButton Text="Refresh" OnClick="refreshLog"/>
+<com:TActiveButton Text="Clear" OnClick="clearLog"/>
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
new file mode 100644
index 00000000..1b5b638a
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
@@ -0,0 +1,31 @@
+<?php
+
+class Ticket703 extends TPage {
+ public function onLoad ($param)
+ {
+ parent::onLoad($param);
+ if (!$this->isPostBack && !$this->isCallback)
+ {
+ $this->refreshLog();
+ }
+ }
+
+ public function refreshLog ()
+ {
+ $this->logBox->Text=file_get_contents(prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt'));
+ }
+
+ public function clearLog ($sender, $param)
+ {
+ $file=prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt');
+ $f=fopen($file,"w");
+ fclose($f);
+ $this->refreshLog();
+ }
+
+ public function addLog($sender,$param)
+ {
+ prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets");
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket703/config.xml b/tests/FunctionalTests/tickets/protected/pages/Ticket703/config.xml
new file mode 100644
index 00000000..a9fd8721
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket703/config.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<configuration>
+ <paths>
+ <using namespace="System.Util.*"/>
+ <using namespace="System.Web.UI.ActiveControls.*"/>
+ <alias id="Ticket703" path="."/>
+ </paths>
+ <modules>
+ <module id="Log" class="TLogRouter">
+ <route class="TFileLogRoute" MaxLogFiles="1" MaxFileSize="1" Levels="Debug" Categories="Tickets" LogPath="Ticket703.Logs" LogFile="LogFile.txt"/>
+ </module>
+ </modules>
+
+</configuration> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php
new file mode 100644
index 00000000..75fc1d45
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php
@@ -0,0 +1,21 @@
+<?php
+class Ticket703TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = 'ctl0_Content_';
+ $this->open('tickets/index.php?page=Ticket703.Ticket703');
+ $this->assertTitle("Verifying Ticket 703.703");
+ // Start with an empty log
+ $this->click($base.'ctl2');
+ // Wait for callback to be lanched
+ $this->pause(2000);
+ $this->assertText($base.'logBox', "");
+ $this->type($base.'logMessage', "Test of prado logging system");
+ $this->click($base.'ctl0');
+ $this->pause(800);
+ $this->click($base.'ctl1');
+ $this->assertTextPresent($base.'logBox', "Test of prado logging system");
+ }
+}
+?> \ No newline at end of file