summaryrefslogtreecommitdiff
path: root/tests/unit/I18N
diff options
context:
space:
mode:
authorknut <>2007-05-29 20:29:10 +0000
committerknut <>2007-05-29 20:29:10 +0000
commit376a5af2d258f87e2be75b667850436987c68a55 (patch)
treeff97724cc6ff4d5a474835d7d915ccbde0ca2c54 /tests/unit/I18N
parent82a351192f38cc73268ea7de7a48e2e0425d5cbf (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)
Diffstat (limited to 'tests/unit/I18N')
-rw-r--r--tests/unit/I18N/core/AllTests.php35
-rw-r--r--tests/unit/I18N/core/CultureInfoTest.php4
-rw-r--r--tests/unit/I18N/core/DateFormatTest.php4
-rw-r--r--tests/unit/I18N/core/DateTimeFormatInfoTest.php4
-rw-r--r--tests/unit/I18N/core/NumberFormatInfoTest.php4
-rw-r--r--tests/unit/I18N/core/NumberFormatTest.php4
6 files changed, 45 insertions, 10 deletions
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';