diff options
| author | knut <> | 2007-05-29 20:29:10 +0000 | 
|---|---|---|
| committer | knut <> | 2007-05-29 20:29:10 +0000 | 
| commit | 376a5af2d258f87e2be75b667850436987c68a55 (patch) | |
| tree | ff97724cc6ff4d5a474835d7d915ccbde0ca2c54 | |
| parent | 82a351192f38cc73268ea7de7a48e2e0425d5cbf (diff) | |
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)
33 files changed, 407 insertions, 190 deletions
| diff --git a/.gitattributes b/.gitattributes index 85c7e436..df3eb8d5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2792,14 +2792,17 @@ tests/test_tools/simpletest/reflection_php5.php -text  tests/test_tools/simpletest/selector.php -text  tests/test_tools/simpletest/simpletest.php -text  tests/test_tools/simpletest/test_case.php -text +tests/unit/AllTests.php -text  tests/unit/Caching/TDirectoryCacheDependencyTest.php -text  tests/unit/Caching/TFileCacheDependencyTest.php -text +tests/unit/Collections/AllTests.php -text  tests/unit/Collections/TListTest.php -text  tests/unit/Collections/TMapTest.php -text  tests/unit/Data/TDbCommandTest.php -text  tests/unit/Data/TDbConnectionTest.php -text  tests/unit/Data/TDbDataReaderTest.php -text  tests/unit/Data/TDbTransactionTest.php -text +tests/unit/I18N/core/AllTests.php -text  tests/unit/I18N/core/CultureInfoTest.php -text  tests/unit/I18N/core/DateFormatTest.php -text  tests/unit/I18N/core/DateTimeFormatInfoTest.php -text @@ -2918,6 +2921,7 @@ tests/unit/SQLMap/sqlite/backup.db -text  tests/unit/SQLMap/sqlite/tests.db -text  tests/unit/TComponentTest.php -text  tests/unit/Util/DateTimeStampTestCase.php -text +tests/unit/Web/AllTests.php -text  tests/unit/Web/TAssetManagerTest.php -text  tests/unit/Web/THttpCookieCollectionTest.php -text  tests/unit/Web/THttpCookieTest.php -text @@ -2926,14 +2930,16 @@ 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/WebControls/AllTests.php -text  tests/unit/Web/UI/WebControls/TDropDownListTest.php -text  tests/unit/Web/UI/WebControls/TLabelTest.php -text  tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php -text  tests/unit/Web/UI/WebControls/TXmlTransformTest.php -text  tests/unit/Web/UI/WebControls/data/hello.xml -text  tests/unit/Web/UI/WebControls/data/hello.xsl -text +tests/unit/Xml/AllTests.php -text  tests/unit/Xml/TRssFeedDocumentTest.php -text  tests/unit/Xml/TXmlDocumentTest.php -text  tests/unit/Xml/TXmlElementListTest.php -text  tests/unit/Xml/TXmlElementTest.php -text -tests/unit/phpunit2.php -text +tests/unit/phpunit.php -text diff --git a/tests/unit/AllTests.php b/tests/unit/AllTests.php new file mode 100644 index 00000000..38096801 --- /dev/null +++ b/tests/unit/AllTests.php @@ -0,0 +1,39 @@ +<?php +require_once dirname(__FILE__).'/phpunit.php'; + +if(!defined('PHPUnit_MAIN_METHOD')) { +  define('PHPUnit_MAIN_METHOD', 'AllTests::main'); +} + +require_once 'Xml/AllTests.php'; +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 'TComponentTest.php'; + +class AllTests { +  public static function main() { +    PHPUnit_TextUI_TestRunner::run(self::suite()); +  } +   +  public static function suite() { +    $suite = new PHPUnit_Framework_TestSuite('PRADO PHP Framework'); +     +	$suite->addTest(Xml_AllTests::suite()); +	$suite->addTest(Collections_AllTests::suite()); +	$suite->addTest(I18N_core_AllTests::suite()); +	$suite->addTest(Web_AllTests::suite()); +	$suite->addTest(Web_UI_WebControls_AllTests::suite()); +	 +	$suite->addTestSuite('TComponentTest'); + +    return $suite; +  } +} + +if(PHPUnit_MAIN_METHOD == 'AllTests::main') { +  AllTests::main(); +} +?> diff --git a/tests/unit/Collections/AllTests.php b/tests/unit/Collections/AllTests.php new file mode 100644 index 00000000..c9da9132 --- /dev/null +++ b/tests/unit/Collections/AllTests.php @@ -0,0 +1,29 @@ +<?php +require_once dirname(__FILE__).'/../phpunit.php'; + +if(!defined('PHPUnit_MAIN_METHOD')) { +  define('PHPUnit_MAIN_METHOD', 'Collections_AllTests::main'); +} + +require_once 'Collections/TListTest.php'; +require_once 'Collections/TMapTest.php'; + +class Collections_AllTests { +  public static function main() { +    PHPUnit_TextUI_TestRunner::run(self::suite()); +  } +   +  public static function suite() { +    $suite = new PHPUnit_Framework_TestSuite('System.Collections'); +     +    $suite->addTestSuite('TListTest'); +	$suite->addTestSuite('TMapTest'); +     +    return $suite; +  } +} + +if(PHPUnit_MAIN_METHOD == 'Collections_AllTests::main') { +  Collections_AllTests::main(); +} +?> diff --git a/tests/unit/Collections/TListTest.php b/tests/unit/Collections/TListTest.php index e090728c..1750d743 100644 --- a/tests/unit/Collections/TListTest.php +++ b/tests/unit/Collections/TListTest.php @@ -1,5 +1,5 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  class ListItem  { @@ -9,7 +9,7 @@ class ListItem  /**   * @package System.Collections   */ -class TListTest extends PHPUnit2_Framework_TestCase { +class TListTest extends PHPUnit_Framework_TestCase {    protected $list;    protected $item1,$item2,$item3; diff --git a/tests/unit/Collections/TMapTest.php b/tests/unit/Collections/TMapTest.php index f7661afd..10e620f5 100644 --- a/tests/unit/Collections/TMapTest.php +++ b/tests/unit/Collections/TMapTest.php @@ -1,5 +1,5 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  class MapItem {    public $data='data'; @@ -8,7 +8,7 @@ class MapItem {  /**   * @package System.Collections   */ -class TMapTest extends PHPUnit2_Framework_TestCase { +class TMapTest extends PHPUnit_Framework_TestCase {    protected $map;    protected $item1,$item2,$item3; diff --git a/tests/unit/Data/TDbTransactionTest.php b/tests/unit/Data/TDbTransactionTest.php index 9d34857d..4cfd2943 100644 --- a/tests/unit/Data/TDbTransactionTest.php +++ b/tests/unit/Data/TDbTransactionTest.php @@ -1,6 +1,6 @@  <?php -require_once(dirname(__FILE__).'/../phpunit2.php'); +require_once(dirname(__FILE__).'/../phpunit.php');  Prado::using('System.Data.*'); @@ -9,7 +9,7 @@ define('TEST_DB_FILE',dirname(__FILE__).'/db/test.db');  /**   * @package System.Data.PDO   */ -class TDbTransactionTest extends PHPUnit2_Framework_TestCase +class TDbTransactionTest extends PHPUnit_Framework_TestCase  {  	private $_connection; diff --git a/tests/unit/I18N/core/AllTests.php b/tests/unit/I18N/core/AllTests.php new file mode 100644 index 00000000..66c8a6f2 --- /dev/null +++ b/tests/unit/I18N/core/AllTests.php @@ -0,0 +1,35 @@ +<?php +require_once dirname(__FILE__).'/../../phpunit.php'; + +if(!defined('PHPUnit_MAIN_METHOD')) { +  define('PHPUnit_MAIN_METHOD', 'I18N_core_AllTests::main'); +} + +require_once 'CultureInfoTest.php'; +require_once 'DateFormatTest.php'; +require_once 'DateTimeFormatInfoTest.php'; +require_once 'NumberFormatInfoTest.php'; +require_once 'NumberFormatTest.php'; + +class I18N_core_AllTests { +  public static function main() { +    PHPUnit_TextUI_TestRunner::run(self::suite()); +  } +   +  public static function suite() { +    $suite = new PHPUnit_Framework_TestSuite('System.I18N.core'); +     +    $suite->addTestSuite('CultureInfoTest'); +	$suite->addTestSuite('DateFormatTest'); +	$suite->addTestSuite('DateTimeFormatInfoTest'); +	$suite->addTestSuite('NumberFormatInfoTest'); +	$suite->addTestSuite('NumberFormatTest'); +     +    return $suite; +  } +} + +if(PHPUnit_MAIN_METHOD == 'I18N_core_AllTests::main') { +  I18N_core_AllTests::main(); +} +?> diff --git a/tests/unit/I18N/core/CultureInfoTest.php b/tests/unit/I18N/core/CultureInfoTest.php index 14b60ece..c043edd7 100644 --- a/tests/unit/I18N/core/CultureInfoTest.php +++ b/tests/unit/I18N/core/CultureInfoTest.php @@ -1,12 +1,12 @@  <?php -require_once dirname(__FILE__).'/../../phpunit2.php'; +require_once dirname(__FILE__).'/../../phpunit.php';  Prado::using('System.I18N.core.CultureInfo');  /**   * @package System.I18N.core   */ -class CultureInfoTest extends PHPUnit2_Framework_TestCase { +class CultureInfoTest extends PHPUnit_Framework_TestCase {    protected $culture;    function setUp() { diff --git a/tests/unit/I18N/core/DateFormatTest.php b/tests/unit/I18N/core/DateFormatTest.php index 3f5c9449..da7c6b73 100644 --- a/tests/unit/I18N/core/DateFormatTest.php +++ b/tests/unit/I18N/core/DateFormatTest.php @@ -1,12 +1,12 @@  <?php -require_once dirname(__FILE__).'/../../phpunit2.php'; +require_once dirname(__FILE__).'/../../phpunit.php';  Prado::using('System.I18N.core.DateFormat');  /**   * @package System.I18N.core   */ -class DateFormatTest extends PHPUnit2_Framework_TestCase { +class DateFormatTest extends PHPUnit_Framework_TestCase {    public function testStandardPatterns() {      $dateFormatter = new DateFormat(); diff --git a/tests/unit/I18N/core/DateTimeFormatInfoTest.php b/tests/unit/I18N/core/DateTimeFormatInfoTest.php index dcef6ba1..789329ce 100644 --- a/tests/unit/I18N/core/DateTimeFormatInfoTest.php +++ b/tests/unit/I18N/core/DateTimeFormatInfoTest.php @@ -1,12 +1,12 @@  <?php -require_once dirname(__FILE__).'/../../phpunit2.php'; +require_once dirname(__FILE__).'/../../phpunit.php';  Prado::using('System.I18N.core.DateTimeFormatInfo');  /**   * @package System.I18N.core   */ -class DateTimeFormatInfoTest extends PHPUnit2_Framework_TestCase { +class DateTimeFormatInfoTest extends PHPUnit_Framework_TestCase {    protected $format; diff --git a/tests/unit/I18N/core/NumberFormatInfoTest.php b/tests/unit/I18N/core/NumberFormatInfoTest.php index a3b6d05a..e01ba43e 100644 --- a/tests/unit/I18N/core/NumberFormatInfoTest.php +++ b/tests/unit/I18N/core/NumberFormatInfoTest.php @@ -1,5 +1,5 @@  <?php -require_once dirname(__FILE__).'/../../phpunit2.php'; +require_once dirname(__FILE__).'/../../phpunit.php';  //NOTE: This page require UTF-8 aware editors  Prado::using('System.I18N.core.NumberFormatInfo'); @@ -7,7 +7,7 @@ Prado::using('System.I18N.core.NumberFormatInfo');  /**   * @package System.I18N.core   */ -class NumberFormatInfoTest extends PHPUnit2_Framework_TestCase { +class NumberFormatInfoTest extends PHPUnit_Framework_TestCase {    function testCurrencyPatterns() {      $numberInfo = NumberFormatInfo::getCurrencyInstance(); diff --git a/tests/unit/I18N/core/NumberFormatTest.php b/tests/unit/I18N/core/NumberFormatTest.php index e136058e..07d0d9ca 100644 --- a/tests/unit/I18N/core/NumberFormatTest.php +++ b/tests/unit/I18N/core/NumberFormatTest.php @@ -1,5 +1,5 @@  <?php -require_once dirname(__FILE__).'/../../phpunit2.php'; +require_once dirname(__FILE__).'/../../phpunit.php';  //NOTE: This page require UTF-8 aware editors  Prado::using('System.I18N.core.NumberFormat'); @@ -7,7 +7,7 @@ Prado::using('System.I18N.core.NumberFormat');  /**   * @package System.I18N.core   */ -class NumberFormatTest extends PHPUnit2_Framework_TestCase { +class NumberFormatTest extends PHPUnit_Framework_TestCase {    function testDefaultFormats() {      $formatter = new NumberFormat();      $number = '123456789.125156'; diff --git a/tests/unit/TComponentTest.php b/tests/unit/TComponentTest.php index e62017a7..25292c0d 100644 --- a/tests/unit/TComponentTest.php +++ b/tests/unit/TComponentTest.php @@ -1,5 +1,5 @@  <?php -require_once dirname(__FILE__).'/phpunit2.php'; +require_once dirname(__FILE__).'/phpunit.php';  class NewComponent extends TComponent {    private $_object = null; @@ -38,7 +38,7 @@ class NewComponent extends TComponent {  /**   * @package System   */ -class TComponentTest extends PHPUnit2_Framework_TestCase { +class TComponentTest extends PHPUnit_Framework_TestCase {    protected $component; 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 @@ +<?php +require_once dirname(__FILE__).'/../phpunit.php'; + +if(!defined('PHPUnit_MAIN_METHOD')) { +  define('PHPUnit_MAIN_METHOD', 'Web_AllTests::main'); +} + +require_once 'TAssetManagerTest.php'; +require_once 'THttpCookieCollectionTest.php'; +require_once 'THttpCookieTest.php'; +require_once 'THttpRequestTest.php'; +require_once 'THttpResponseTest.php'; +require_once 'THttpSessionTest.php'; +require_once 'THttpUtilityTest.php'; +require_once 'TUriTest.php'; + +class Web_AllTests { +  public static function main() { +    PHPUnit_TextUI_TestRunner::run(self::suite()); +  } +   +  public static function suite() { +    $suite = new PHPUnit_Framework_TestSuite('System.Web'); +     +	$suite->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 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Web.TAssetManager');  /**   * @package System.Web   */ -class TAssetManagerTest extends PHPUnit2_Framework_TestCase { +class TAssetManagerTest extends PHPUnit_Framework_TestCase {    public function testInit() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetBasePath() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetBaseUrl() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testPublishFilePath() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testPublishTarFile() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ 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 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Web.THttpRequest');  /**   * @package System.Web   */ -class THttpCookieCollectionTest extends PHPUnit2_Framework_TestCase { +class THttpCookieCollectionTest extends PHPUnit_Framework_TestCase {    public function testConstruct() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testInsertAt() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testRemoveAt() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testItemAt() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testFindCookieByName() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ 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 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Web.THttpRequest');  /**   * @package System.Web   */ -class THttpCookieTest extends PHPUnit2_Framework_TestCase { +class THttpCookieTest extends PHPUnit_Framework_TestCase {    public function testConstruct() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetDomain() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetExpire() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetName() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetValue() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetPath() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetSecure() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ 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 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Web.THttpRequest');  /**   * @package System.Web   */ -class THttpRequestTest extends PHPUnit2_Framework_TestCase { +class THttpRequestTest extends PHPUnit_Framework_TestCase {    public function testInit() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testStripSlashes() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetUrlFormat() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUrl() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetRequestMethod() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetIsSecureConnection() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetPathInfo() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetQueryString() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetRequestUri() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetApplicationUrl() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetApplicationFilePath() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetServerName() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetServerPort() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUrlReferrer() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetBrowser() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUserAgent() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUserHostAddress() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUserHost() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetAcceptTypes() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUserLanguages() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetEnableCookieValidation() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetCookies() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUploadedFiles() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetServerVariables() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetEnvironmentVariables() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testConstructUrl() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetAvailableServices() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetAvailableServices() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetServiceID() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetIterator() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetCount() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetKeys() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testItemAt() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testAdd() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testRemove() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testContains() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testToArray() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOffsetExists() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOffsetGet() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOffsetSet() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOffsetUnset() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ 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 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Web.THttpResponse');  /**   * @package System.Web   */ -class THttpResponseTest extends PHPUnit2_Framework_TestCase { +class THttpResponseTest extends PHPUnit_Framework_TestCase {    public function testInit() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetCacheExpire() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetCacheControl() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetContentType() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetCharset() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetBufferOutput() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetStatusCode() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetCookies() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testWrite() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testWriteFile() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testRedirect() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testReload() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testFlush() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSendContentTypeHeader() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testClear() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testAppendHeader() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testAppendLog() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testAddCookie() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testRemoveCookie() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetHtmlWriterType() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testCreateHtmlWriter() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ 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 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Web.THttpSession');  /**   * @package System.Web   */ -class THttpSessionTest extends PHPUnit2_Framework_TestCase { +class THttpSessionTest extends PHPUnit_Framework_TestCase {    public function testInit() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOpen() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testClose() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testDestroy() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetIsStarted() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetSessionID() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetSessionName() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetSavePath() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetUseCustomStorage() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetCookieMode() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetAutoStart() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetGProbability() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetUseTransparentSessionID() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetTimeout() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetIterator() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetCount() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetKeys() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testItemAt() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testAdd() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testRemove() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testContains() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testToArray() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOffsetExists() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOffsetGet() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOffsetSet() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testOffsetUnset() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ 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 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Web.THttpUtility');  /**   * @package System.Web   */ -class THttpUtilityTest extends PHPUnit2_Framework_TestCase { +class THttpUtilityTest extends PHPUnit_Framework_TestCase {    public function testHtmlEncode() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testHtmlDecode() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ 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 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Web.THttpRequest');  /**   * @package System.Web   */ -class TUriTest extends PHPUnit2_Framework_TestCase { +class TUriTest extends PHPUnit_Framework_TestCase {    public function testConstruct() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUri() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetScheme() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetHost() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetPort() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetUser() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetPassword() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetPath() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetQuery() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetFragment() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ 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 @@ +<?php +require_once dirname(__FILE__).'/../../../phpunit.php'; + +if(!defined('PHPUnit_MAIN_METHOD')) { +  define('PHPUnit_MAIN_METHOD', 'Web_UI_WebControls_AllTests::main'); +} + +require_once 'TDropDownListTest.php'; +require_once 'TLabelTest.php'; +require_once 'TRequiredFieldValidatorTest.php'; +require_once 'TXmlTransformTest.php'; + +class Web_UI_WebControls_AllTests { +  public static function main() { +    PHPUnit_TextUI_TestRunner::run(self::suite()); +  } +   +  public static function suite() { +    $suite = new PHPUnit_Framework_TestSuite('System.Web.UI.WebControls'); +     +	$suite->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 @@  <?php -require_once dirname(__FILE__).'/../../../phpunit2.php'; +require_once dirname(__FILE__).'/../../../phpunit.php';  Prado::using('System.Web.UI.WebControls.TDropDownList');  /**   * @package System.Web.UI.WebControls   */ -class TDropDownListTest extends PHPUnit2_Framework_TestCase { +class TDropDownListTest extends PHPUnit_Framework_TestCase {    public function testSetDataSource() {      $list = new TDropDownList(); diff --git a/tests/unit/Web/UI/WebControls/TLabelTest.php b/tests/unit/Web/UI/WebControls/TLabelTest.php index 726137d4..214d497c 100644 --- a/tests/unit/Web/UI/WebControls/TLabelTest.php +++ b/tests/unit/Web/UI/WebControls/TLabelTest.php @@ -1,5 +1,5 @@  <?php -require_once dirname(__FILE__).'/../../../phpunit2.php'; +require_once dirname(__FILE__).'/../../../phpunit.php';  Prado::using('System.Web.UI.WebControls.TLabel');  Prado::using('System.Web.UI.THtmlWriter'); @@ -7,7 +7,7 @@ Prado::using('System.Web.UI.THtmlWriter');  /**   * @package System.Web.UI.WebControls   */ -class TLabelTest extends PHPUnit2_Framework_TestCase { +class TLabelTest extends PHPUnit_Framework_TestCase {    public function testSetText() {      $label = new TLabel(); diff --git a/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php b/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php index 3146cb06..ae8ac1f5 100644 --- a/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php +++ b/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php @@ -1,12 +1,12 @@  <?php -require_once dirname(__FILE__).'/../../../phpunit2.php'; +require_once dirname(__FILE__).'/../../../phpunit.php';  Prado::using('System.Web.UI.WebControls.TRequiredFieldValidator');  /**   * @package System.Web.UI.WebControls   */ -class TRequiredFieldValidatorTest extends PHPUnit2_Framework_TestCase { +class TRequiredFieldValidatorTest extends PHPUnit_Framework_TestCase {    public function testGetEmptyInitialValue() {      $validator = new TRequiredFieldValidator(); diff --git a/tests/unit/Web/UI/WebControls/TXmlTransformTest.php b/tests/unit/Web/UI/WebControls/TXmlTransformTest.php index e277edbd..9fc6d769 100644 --- a/tests/unit/Web/UI/WebControls/TXmlTransformTest.php +++ b/tests/unit/Web/UI/WebControls/TXmlTransformTest.php @@ -1,5 +1,5 @@  <?php -require_once dirname(__FILE__).'/../../../phpunit2.php'; +require_once dirname(__FILE__).'/../../../phpunit.php';  Prado::using('System.Web.UI.WebControls.TXmlTransform');  Prado::using('System.Web.UI.THtmlWriter'); @@ -7,7 +7,7 @@ Prado::using('System.Web.UI.THtmlWriter');  /**   * @package System.Web.UI.WebControls   */ -class TXmlTransformTest extends PHPUnit2_Framework_TestCase { +class TXmlTransformTest extends PHPUnit_Framework_TestCase {    private $documentContent;    private $transformContent; @@ -70,7 +70,7 @@ class TXmlTransformTest extends PHPUnit2_Framework_TestCase {    }    public function testAddParameter() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testRenderWithDocumentContentAndTransformContent() { @@ -122,7 +122,7 @@ class TXmlTransformTest extends PHPUnit2_Framework_TestCase {    }    public function testRenderWithBodyAsDocumentAndTransformPath() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  } diff --git a/tests/unit/Xml/AllTests.php b/tests/unit/Xml/AllTests.php new file mode 100644 index 00000000..0760474f --- /dev/null +++ b/tests/unit/Xml/AllTests.php @@ -0,0 +1,31 @@ +<?php +require_once dirname(__FILE__).'/../phpunit.php'; + +if(!defined('PHPUnit_MAIN_METHOD')) { +  define('PHPUnit_MAIN_METHOD', 'Xml_AllTests::main'); +} + +require_once 'Xml/TXmlDocumentTest.php'; +require_once 'Xml/TXmlElementTest.php'; +require_once 'Xml/TXmlElementListTest.php'; + +class Xml_AllTests { +  public static function main() { +    PHPUnit_TextUI_TestRunner::run(self::suite()); +  } +   +  public static function suite() { +    $suite = new PHPUnit_Framework_TestSuite('System.Xml'); +     +    $suite->addTestSuite('TXmlDocumentTest'); +	$suite->addTestSuite('TXmlElementTest'); +	$suite->addTestSuite('TXmlElementListTest'); +     +    return $suite; +  } +} + +if(PHPUnit_MAIN_METHOD == 'Xml_AllTests::main') { +  Xml_AllTests::main(); +} +?> diff --git a/tests/unit/Xml/TRssFeedDocumentTest.php b/tests/unit/Xml/TRssFeedDocumentTest.php index ad6bf7dc..e49b5eca 100644 --- a/tests/unit/Xml/TRssFeedDocumentTest.php +++ b/tests/unit/Xml/TRssFeedDocumentTest.php @@ -1,12 +1,12 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Xml.TRssFeedDocument');  /**   * @package System.Xml.TRssFeedDocument   */ -class TRssFeedDocumentTest extends PHPUnit2_Framework_TestCase { +class TRssFeedDocumentTest extends PHPUnit_Framework_TestCase {    public function testConstruct() {      $feed = new TRssFeedDocument(); diff --git a/tests/unit/Xml/TXmlDocumentTest.php b/tests/unit/Xml/TXmlDocumentTest.php index fe08edda..1e588974 100644 --- a/tests/unit/Xml/TXmlDocumentTest.php +++ b/tests/unit/Xml/TXmlDocumentTest.php @@ -1,35 +1,35 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Xml.TXmlDocument');  /**   * @package System.Xml   */ -class TXmlDocumentTest extends PHPUnit2_Framework_TestCase { +class TXmlDocumentTest extends PHPUnit_Framework_TestCase {    public function testConstruct() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetVersion() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetEncoding() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testLoadFromFile() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testLoadFromString() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSaveToString() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ No newline at end of file diff --git a/tests/unit/Xml/TXmlElementListTest.php b/tests/unit/Xml/TXmlElementListTest.php index cfebf095..eb91c46f 100644 --- a/tests/unit/Xml/TXmlElementListTest.php +++ b/tests/unit/Xml/TXmlElementListTest.php @@ -1,23 +1,23 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Xml.TXmlDocument');  /**   * @package System.Xml   */ -class TXmlElementListTest extends PHPUnit2_Framework_TestCase { +class TXmlElementListTest extends PHPUnit_Framework_TestCase {    public function testConstruct() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testInsertAt() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testRemoveAt() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ No newline at end of file diff --git a/tests/unit/Xml/TXmlElementTest.php b/tests/unit/Xml/TXmlElementTest.php index 41431633..eec22b1f 100644 --- a/tests/unit/Xml/TXmlElementTest.php +++ b/tests/unit/Xml/TXmlElementTest.php @@ -1,46 +1,46 @@  <?php -require_once dirname(__FILE__).'/../phpunit2.php'; +require_once dirname(__FILE__).'/../phpunit.php';  Prado::using('System.Xml.TXmlDocument');  /**   * @package System.Xml   */ -class TXmlElementTest extends PHPUnit2_Framework_TestCase { +class TXmlElementTest extends PHPUnit_Framework_TestCase {    public function setUp() {    }    public function testConstruct() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetParent() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetTagName() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetValue() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testSetAttribute() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetElementByTagName() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testGetElementsByTagName() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }    public function testToString() { -    throw new PHPUnit2_Framework_IncompleteTestError(); +    throw new PHPUnit_Framework_IncompleteTestError();    }  }  ?>
\ No newline at end of file diff --git a/tests/unit/phpunit2.php b/tests/unit/phpunit.php index 8d9c8d0d..54e731b6 100644 --- a/tests/unit/phpunit2.php +++ b/tests/unit/phpunit.php @@ -5,7 +5,7 @@   * This file should be included in all unit tests with absolute path to be able to run it   * from the command line with "phpunit" like this:   * - * require_once dirname(__FILE__).'/path/../to/../phpunit2.php'; + * require_once dirname(__FILE__).'/path/../to/../phpunit.php';   *   * Also remember do define the @package attribute for your test class to make it appear under   * the right package in unit test and code coverage reports. @@ -13,6 +13,9 @@  define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework');  set_include_path(PRADO_FRAMEWORK_DIR.':'.get_include_path());  require_once PRADO_FRAMEWORK_DIR.'/prado.php'; -require_once 'PHPUnit2/Framework/TestCase.php'; -require_once 'PHPUnit2/Framework/IncompleteTestError.php'; +require_once 'PHPUnit/Framework/TestCase.php'; +require_once 'PHPUnit/Framework/IncompleteTestError.php'; +require_once 'PHPUnit/Framework/TestSuite.php'; +require_once 'PHPUnit/TextUI/TestRunner.php'; +require_once 'PHPUnit/Util/Filter.php';  ?> | 
