diff options
author | knut <> | 2007-06-11 17:24:23 +0000 |
---|---|---|
committer | knut <> | 2007-06-11 17:24:23 +0000 |
commit | 664830a178052d915d5dfc59a3e023120781d6ba (patch) | |
tree | a353bc02db96af0e4a9c474c8bbfcf874f9611e5 /tests | |
parent | dbd2306c6986e16e5cf92b01aa0a08040cb8b1b7 (diff) |
corrected TAPCCache according to #646 and added some more stubs for unit tests in System.Web.UI
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/Caching/TAPCCacheTest.php | 6 | ||||
-rw-r--r-- | tests/unit/Web/AllTests.php | 4 | ||||
-rw-r--r-- | tests/unit/Web/UI/AllTests.php | 47 | ||||
-rw-r--r-- | tests/unit/Web/UI/TControlAdapterTest.php | 60 | ||||
-rw-r--r-- | tests/unit/Web/UI/TControlTest.php | 280 | ||||
-rw-r--r-- | tests/unit/Web/UI/TFormTest.php | 36 | ||||
-rw-r--r-- | tests/unit/Web/UI/TPageTest.php | 195 |
7 files changed, 625 insertions, 3 deletions
diff --git a/tests/unit/Caching/TAPCCacheTest.php b/tests/unit/Caching/TAPCCacheTest.php index 2bf1d5d3..bfd561e7 100644 --- a/tests/unit/Caching/TAPCCacheTest.php +++ b/tests/unit/Caching/TAPCCacheTest.php @@ -53,8 +53,8 @@ class TAPCCacheTest extends PHPUnit_Framework_TestCase { } public function testAdd() { - self::$cache->add('key', 'value'); - self::assertEquals('value', self::$cache->get('key')); + self::$cache->add('anotherkey', 'value'); + self::assertEquals('value', self::$cache->get('anotherkey')); } public function testDelete() { @@ -63,7 +63,7 @@ class TAPCCacheTest extends PHPUnit_Framework_TestCase { } public function testFlush() { - $this->testAdd(); + $this->testSetAndGet(); self::assertEquals(true, self::$cache->flush()); } diff --git a/tests/unit/Web/AllTests.php b/tests/unit/Web/AllTests.php index c9666be9..0315c7eb 100644 --- a/tests/unit/Web/AllTests.php +++ b/tests/unit/Web/AllTests.php @@ -14,6 +14,8 @@ require_once 'THttpSessionTest.php'; require_once 'THttpUtilityTest.php'; require_once 'TUriTest.php'; +require_once 'UI/AllTests.php'; + class Web_AllTests { public static function main() { PHPUnit_TextUI_TestRunner::run(self::suite()); @@ -31,6 +33,8 @@ class Web_AllTests { $suite->addTestSuite('THttpUtilityTest'); $suite->addTestSuite('TUriTest'); + $suite->addTest(Web_UI_AllTests::suite()); + return $suite; } } diff --git a/tests/unit/Web/UI/AllTests.php b/tests/unit/Web/UI/AllTests.php new file mode 100644 index 00000000..177852b3 --- /dev/null +++ b/tests/unit/Web/UI/AllTests.php @@ -0,0 +1,47 @@ +<?php +require_once dirname(__FILE__).'/../../phpunit.php'; + +if(!defined('PHPUnit_MAIN_METHOD')) { + define('PHPUnit_MAIN_METHOD', 'Web_UI_AllTests::main'); +} + +require_once 'TClientScriptManagerTest.php'; +require_once 'TControlAdapterTest.php'; +require_once 'TControlTest.php'; +require_once 'TFormTest.php'; +require_once 'TPageTest.php'; +/*require_once 'TTemplateControlTest.php'; +require_once 'TTemplateManagerTest.php'; +require_once 'TThemeManagerTest.php'; +require_once 'THtmlWriterTest.php'; +require_once 'TPageStatePersisterTest.php'; +require_once 'TSessionPageStatePersisterTest.php';*/ + +class Web_UI_AllTests { + public static function main() { + PHPUnit_TextUI_TestRunner::run(self::suite()); + } + + public static function suite() { + $suite = new PHPUnit_Framework_TestSuite('System.Web.UI'); + + $suite->addTestSuite('TClientScriptManagerTest'); + $suite->addTestSuite('TControlAdapterTest'); + $suite->addTestSuite('TControlTest'); + $suite->addTestSuite('TFormTest'); + $suite->addTestSuite('TPageTest'); + /*$suite->addTestSuite('TTemplateControlTest'); + $suite->addTestSuite('TTemplateManagerTest'); + $suite->addTestSuite('TThemeManagerTest'); + $suite->addTestSuite('THtmlWriterTest'); + $suite->addTestSuite('TPageStatePersisterTest'); + $suite->addTestSuite('TSessionPageStatePersisterTest');*/ + + return $suite; + } +} + +if(PHPUnit_MAIN_METHOD == 'Web_UI_AllTests::main') { + Web_UI_AllTests::main(); +} +?> diff --git a/tests/unit/Web/UI/TControlAdapterTest.php b/tests/unit/Web/UI/TControlAdapterTest.php new file mode 100644 index 00000000..9ae20a49 --- /dev/null +++ b/tests/unit/Web/UI/TControlAdapterTest.php @@ -0,0 +1,60 @@ +<?php +require_once dirname(__FILE__).'/../../phpunit.php'; + +Prado::using('System.Web.UI.TControlAdapter'); + +/** + * @package System.Web.UI + */ +class TControlAdapterTest extends PHPUnit_Framework_TestCase { + + public function testConstruct() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetControl() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetPage() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testCreateChildControls() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testLoadState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSaveState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnInit() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnLoad() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnPreRender() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnUnload() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRender() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRenderChildren() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + +} +?>
\ No newline at end of file diff --git a/tests/unit/Web/UI/TControlTest.php b/tests/unit/Web/UI/TControlTest.php new file mode 100644 index 00000000..9597c23e --- /dev/null +++ b/tests/unit/Web/UI/TControlTest.php @@ -0,0 +1,280 @@ +<?php +require_once dirname(__FILE__).'/../../phpunit.php'; + +Prado::using('System.Web.UI.TControl'); + +/** + * @package System.Web.UI + */ +class TControlTest extends PHPUnit_Framework_TestCase { + + public function testConstruct() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function test__get() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetHasAdapter() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetAdapter() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetParent() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetNamingContainer() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetPage() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetTemplateControl() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetSourceTemplateControl() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetControlStage() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetID() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetUniqueID() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testFocus() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetClientID() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetSkinID() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetEnableTheming() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetCustomData() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetHasControls() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetControls() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetVisible() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetEnabled() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetHasAttributes() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetAttributes() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testHasAttribute() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetAttribute() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRemoveAttribute() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetEnableViewState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetControlState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testTrackViewState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetViewState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testClearViewState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testBindProperty() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testUnbindProperty() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testAutoBindProperty() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testDataBind() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testEnsureChildControls() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testCreateChildControls() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testFindControl() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testFindControlsByType() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testFindControlsByID() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testClearNamingContainer() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRegisterObject() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testUnregisterObject() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testIsObjectRegistered() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetHasChildInitialized() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetHasInitialized() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetHasLoadedPostData() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetHasLoaded() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetHasPreRendered() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetRegisteredObject() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetAllowChildControls() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testAddParsedObject() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testAddedControl() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRemovedControl() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnInit() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnLoad() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnDataBinding() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnUnload() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnPreRender() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testBubbleEvent() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testBroadcastEvent() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRenderControl() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRender() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRenderChildren() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSaveState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testLoadState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testApplyStyleSheetSkin() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + +} +?>
\ No newline at end of file diff --git a/tests/unit/Web/UI/TFormTest.php b/tests/unit/Web/UI/TFormTest.php new file mode 100644 index 00000000..e2f312d6 --- /dev/null +++ b/tests/unit/Web/UI/TFormTest.php @@ -0,0 +1,36 @@ +<?php +require_once dirname(__FILE__).'/../../phpunit.php'; + +Prado::using('System.Web.UI.TForm'); + +/** + * @package System.Web.UI + */ +class TFormTest extends PHPUnit_Framework_TestCase { + + public function testOnInit() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRender() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetDefaultButton() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetMethod() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetEnctype() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetName() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + +} +?>
\ No newline at end of file diff --git a/tests/unit/Web/UI/TPageTest.php b/tests/unit/Web/UI/TPageTest.php new file mode 100644 index 00000000..6f7f8268 --- /dev/null +++ b/tests/unit/Web/UI/TPageTest.php @@ -0,0 +1,195 @@ +<?php +require_once dirname(__FILE__).'/../../phpunit.php'; + +Prado::using('System.Web.UI.TPage'); + +/** + * @package System.Web.UI + */ +class TPageTest extends PHPUnit_Framework_TestCase { + + public function testConstruct() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRun() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetCallbackClient() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetCallbackEventTarget() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetCallbackEventParameter() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRegisterPostDataLoader() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetPostDataLoaders() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetForm() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetValidators() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testValidate() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetIsValid() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetTheme() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetStyleSheetTheme() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testApplyControlSkin() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testApplyControlStyleSheet() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetClientScript() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnPreInit() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnInitComplete() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnPreLoad() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnLoadComplete() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnPreRenderComplete() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testOnSaveStateComplete() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetIsPostBack() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetIsCallback() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSaveState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testLoadState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRegisterRequiresPostData() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetPostBackEventTarget() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetPostBackEventParameter() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetIsLoadingPostData() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testEnsureRenderInForm() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testBeginFormRender() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testEndFormRender() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetFocus() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetClientSupportsJavaScript() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetHead() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetTitle() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetClientState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetRequestClientState() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetStatePersisterClass() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetStatePersister() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetEnableStateValidation() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetEnableStateEncryption() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testSetAndGetPagePath() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testRegisterCachingAction() { + throw new PHPUnit_Framework_IncompleteTestError(); + } + + public function testGetCachingStack() { + throw new PHPUnit_Framework_IncompleteTestError(); + } +} +?>
\ No newline at end of file |