From 376a5af2d258f87e2be75b667850436987c68a55 Mon Sep 17 00:00:00 2001 From: knut <> Date: Tue, 29 May 2007 20:29:10 +0000 Subject: upgraded unit test suite to use PHPUnit3 use "cd tests/; phpunit AllTests.php" to run the tests use "cd tests/; phpunit --report=coverage AllTests.php" to get a nice code coverage report (need xdebug) --- tests/unit/Web/AllTests.php | 41 +++++++++++ tests/unit/Web/TAssetManagerTest.php | 14 ++-- tests/unit/Web/THttpCookieCollectionTest.php | 14 ++-- tests/unit/Web/THttpCookieTest.php | 18 ++--- tests/unit/Web/THttpRequestTest.php | 86 +++++++++++----------- tests/unit/Web/THttpResponseTest.php | 46 ++++++------ tests/unit/Web/THttpSessionTest.php | 56 +++++++------- tests/unit/Web/THttpUtilityTest.php | 8 +- tests/unit/Web/TUriTest.php | 24 +++--- tests/unit/Web/UI/WebControls/AllTests.php | 33 +++++++++ .../unit/Web/UI/WebControls/TDropDownListTest.php | 4 +- tests/unit/Web/UI/WebControls/TLabelTest.php | 4 +- .../UI/WebControls/TRequiredFieldValidatorTest.php | 4 +- .../unit/Web/UI/WebControls/TXmlTransformTest.php | 8 +- 14 files changed, 217 insertions(+), 143 deletions(-) create mode 100644 tests/unit/Web/AllTests.php create mode 100644 tests/unit/Web/UI/WebControls/AllTests.php (limited to 'tests/unit/Web') diff --git a/tests/unit/Web/AllTests.php b/tests/unit/Web/AllTests.php new file mode 100644 index 00000000..c9666be9 --- /dev/null +++ b/tests/unit/Web/AllTests.php @@ -0,0 +1,41 @@ +addTestSuite('TAssetManagerTest'); + $suite->addTestSuite('THttpCookieCollectionTest'); + $suite->addTestSuite('THttpCookieTest'); + $suite->addTestSuite('THttpRequestTest'); + $suite->addTestSuite('THttpResponseTest'); + $suite->addTestSuite('THttpSessionTest'); + $suite->addTestSuite('THttpUtilityTest'); + $suite->addTestSuite('TUriTest'); + + return $suite; + } +} + +if(PHPUnit_MAIN_METHOD == 'Web_AllTests::main') { + Web_AllTests::main(); +} +?> diff --git a/tests/unit/Web/TAssetManagerTest.php b/tests/unit/Web/TAssetManagerTest.php index 1821f28b..49d42165 100644 --- a/tests/unit/Web/TAssetManagerTest.php +++ b/tests/unit/Web/TAssetManagerTest.php @@ -1,31 +1,31 @@ \ No newline at end of file diff --git a/tests/unit/Web/THttpCookieCollectionTest.php b/tests/unit/Web/THttpCookieCollectionTest.php index 28b32a6e..9c648e2b 100644 --- a/tests/unit/Web/THttpCookieCollectionTest.php +++ b/tests/unit/Web/THttpCookieCollectionTest.php @@ -1,31 +1,31 @@ \ No newline at end of file diff --git a/tests/unit/Web/THttpCookieTest.php b/tests/unit/Web/THttpCookieTest.php index ab7d4928..8a96e35e 100644 --- a/tests/unit/Web/THttpCookieTest.php +++ b/tests/unit/Web/THttpCookieTest.php @@ -1,39 +1,39 @@ \ No newline at end of file diff --git a/tests/unit/Web/THttpRequestTest.php b/tests/unit/Web/THttpRequestTest.php index a27eb711..0933fb05 100644 --- a/tests/unit/Web/THttpRequestTest.php +++ b/tests/unit/Web/THttpRequestTest.php @@ -1,175 +1,175 @@ \ No newline at end of file diff --git a/tests/unit/Web/THttpResponseTest.php b/tests/unit/Web/THttpResponseTest.php index 9812c3a6..54d25830 100644 --- a/tests/unit/Web/THttpResponseTest.php +++ b/tests/unit/Web/THttpResponseTest.php @@ -1,95 +1,95 @@ \ No newline at end of file diff --git a/tests/unit/Web/THttpSessionTest.php b/tests/unit/Web/THttpSessionTest.php index 8f30cfa6..179d2903 100644 --- a/tests/unit/Web/THttpSessionTest.php +++ b/tests/unit/Web/THttpSessionTest.php @@ -1,115 +1,115 @@ \ No newline at end of file diff --git a/tests/unit/Web/THttpUtilityTest.php b/tests/unit/Web/THttpUtilityTest.php index 790bc9f6..4dfc46bd 100644 --- a/tests/unit/Web/THttpUtilityTest.php +++ b/tests/unit/Web/THttpUtilityTest.php @@ -1,19 +1,19 @@ \ No newline at end of file diff --git a/tests/unit/Web/TUriTest.php b/tests/unit/Web/TUriTest.php index b606bdc3..fb803d8b 100644 --- a/tests/unit/Web/TUriTest.php +++ b/tests/unit/Web/TUriTest.php @@ -1,51 +1,51 @@ \ No newline at end of file diff --git a/tests/unit/Web/UI/WebControls/AllTests.php b/tests/unit/Web/UI/WebControls/AllTests.php new file mode 100644 index 00000000..f9b188c2 --- /dev/null +++ b/tests/unit/Web/UI/WebControls/AllTests.php @@ -0,0 +1,33 @@ +addTestSuite('TDropDownListTest'); + $suite->addTestSuite('TLabelTest'); + $suite->addTestSuite('TRequiredFieldValidatorTest'); + $suite->addTestSuite('TXmlTransformTest'); + + return $suite; + } +} + +if(PHPUnit_MAIN_METHOD == 'Web_UI_WebControls_AllTests::main') { + Web_UI_WebControls_AllTests::main(); +} +?> diff --git a/tests/unit/Web/UI/WebControls/TDropDownListTest.php b/tests/unit/Web/UI/WebControls/TDropDownListTest.php index b93d32cf..3db425b9 100644 --- a/tests/unit/Web/UI/WebControls/TDropDownListTest.php +++ b/tests/unit/Web/UI/WebControls/TDropDownListTest.php @@ -1,12 +1,12 @@