summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcarl <>2007-06-09 12:26:28 +0000
committercarl <>2007-06-09 12:26:28 +0000
commitc6d4662e08b300ae2d388322f8be8e6d61994074 (patch)
treec8184df26166871a65946503cee46fbee3f41bba
parent57089028b6e03a2c15687b5e4708dd2011af287d (diff)
simple unit test for TActiveHiddenField property Value
-rw-r--r--.gitattributes2
-rw-r--r--tests/unit/AllTests.php2
-rw-r--r--tests/unit/Web/UI/ActiveControls/AllTests.php26
-rw-r--r--tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php18
4 files changed, 48 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index 72050ed6..dac70fb0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2974,6 +2974,8 @@ tests/unit/Web/THttpResponseTest.php -text
tests/unit/Web/THttpSessionTest.php -text
tests/unit/Web/THttpUtilityTest.php -text
tests/unit/Web/TUriTest.php -text
+tests/unit/Web/UI/ActiveControls/AllTests.php -text
+tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php -text
tests/unit/Web/UI/WebControls/AllTests.php -text
tests/unit/Web/UI/WebControls/TDropDownListTest.php -text
tests/unit/Web/UI/WebControls/TLabelTest.php -text
diff --git a/tests/unit/AllTests.php b/tests/unit/AllTests.php
index 6917ac71..bbd53a66 100644
--- a/tests/unit/AllTests.php
+++ b/tests/unit/AllTests.php
@@ -11,6 +11,7 @@ require_once 'Collections/AllTests.php';
require_once 'I18N/core/AllTests.php';
require_once 'Web/AllTests.php';
require_once 'Web/UI/WebControls/AllTests.php';
+require_once 'Web/UI/ActiveControls/AllTests.php';
require_once 'Security/AllTests.php';
require_once 'Caching/AllTests.php';
require_once 'Util/AllTests.php';
@@ -31,6 +32,7 @@ class AllTests {
$suite->addTest(I18N_core_AllTests::suite());
$suite->addTest(Web_AllTests::suite());
$suite->addTest(Web_UI_WebControls_AllTests::suite());
+ $suite->addTest(Web_UI_ActiveControls_AllTests::suite());
$suite->addTest(Security_AllTests::suite());
$suite->addTest(Caching_AllTests::suite());
$suite->addTest(Util_AllTests::suite());
diff --git a/tests/unit/Web/UI/ActiveControls/AllTests.php b/tests/unit/Web/UI/ActiveControls/AllTests.php
new file mode 100644
index 00000000..55c4331d
--- /dev/null
+++ b/tests/unit/Web/UI/ActiveControls/AllTests.php
@@ -0,0 +1,26 @@
+<?php
+require_once dirname(__FILE__).'/../../../phpunit.php';
+
+if(!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', 'Web_UI_ActiveControls_AllTests::main');
+}
+
+require_once 'TActiveHiddenFieldTest.php';
+
+class Web_UI_ActiveControls_AllTests {
+ public static function main() {
+ PHPUnit_TextUI_TestRunner::run(self::suite());
+ }
+
+ public static function suite() {
+ $suite = new PHPUnit_Framework_TestSuite('System.Web.UI.ActiveControls');
+
+ $suite->addTestSuite('TActiveHiddenFieldTest');
+ return $suite;
+ }
+}
+
+if(PHPUnit_MAIN_METHOD == 'Web_UI_ActiveControls_AllTests::main') {
+ Web_UI_ActiveControls_AllTests::main();
+}
+?>
diff --git a/tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php b/tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php
new file mode 100644
index 00000000..f5e9d6fe
--- /dev/null
+++ b/tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php
@@ -0,0 +1,18 @@
+<?php
+require_once dirname(__FILE__).'/../../../phpunit.php';
+
+Prado::using('System.Web.UI.ActiveControls.TActiveHiddenField');
+
+/**
+ * @package System.Web.UI.ActiveControls
+ */
+class TActiveHiddenFieldTest extends PHPUnit_Framework_TestCase {
+
+ public function testSetValue() {
+ $field = new TActiveHiddenField();
+ $field->setValue('Test');
+ $this->assertEquals('Test', $field->getValue());
+ }
+}
+
+?> \ No newline at end of file