diff options
Diffstat (limited to 'tests/unit/Web/UI/ActiveControls')
-rw-r--r-- | tests/unit/Web/UI/ActiveControls/AllTests.php | 26 | ||||
-rw-r--r-- | tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php | 18 |
2 files changed, 44 insertions, 0 deletions
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 |