summaryrefslogtreecommitdiff
path: root/tests/unit/Xml
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/Xml
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/Xml')
-rw-r--r--tests/unit/Xml/AllTests.php31
-rw-r--r--tests/unit/Xml/TRssFeedDocumentTest.php4
-rw-r--r--tests/unit/Xml/TXmlDocumentTest.php16
-rw-r--r--tests/unit/Xml/TXmlElementListTest.php10
-rw-r--r--tests/unit/Xml/TXmlElementTest.php20
5 files changed, 56 insertions, 25 deletions
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