diff options
Diffstat (limited to 'tests/unit/Xml')
-rw-r--r-- | tests/unit/Xml/AllTests.php | 7 | ||||
-rw-r--r-- | tests/unit/Xml/TXmlDocumentTest.php | 7 | ||||
-rw-r--r-- | tests/unit/Xml/TXmlElementListTest.php | 3 | ||||
-rw-r--r-- | tests/unit/Xml/TXmlElementTest.php | 3 |
4 files changed, 8 insertions, 12 deletions
diff --git a/tests/unit/Xml/AllTests.php b/tests/unit/Xml/AllTests.php index d934786b..afb4c7a8 100644 --- a/tests/unit/Xml/AllTests.php +++ b/tests/unit/Xml/AllTests.php @@ -12,14 +12,14 @@ 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; } } @@ -27,4 +27,3 @@ class Xml_AllTests { if(PHPUnit_MAIN_METHOD == 'Xml_AllTests::main') { Xml_AllTests::main(); } -?> diff --git a/tests/unit/Xml/TXmlDocumentTest.php b/tests/unit/Xml/TXmlDocumentTest.php index 2ab95641..54e4b5aa 100644 --- a/tests/unit/Xml/TXmlDocumentTest.php +++ b/tests/unit/Xml/TXmlDocumentTest.php @@ -34,7 +34,7 @@ class TXmlDocumentTest extends PHPUnit_Framework_TestCase { $xmldoc->loadFromFile('unexistentXmlFile.xml'); self::fail('Expected TIOException not thrown'); } catch (TIOException $e) {} - + self::assertTrue($xmldoc->loadFromFile($file)); self::assertEquals('1.0', $xmldoc->getVersion()); self::assertEquals('UTF-8',$xmldoc->getEncoding()); @@ -61,9 +61,9 @@ class TXmlDocumentTest extends PHPUnit_Framework_TestCase { // Result string should be : $resultString="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <node param=\"attribute1\"\n</root>"; self::assertEquals($xmlString, $magicString); - + } - + public function testSaveToFile() { $file=dirname(__FILE__).'/data/tmp.xml'; if (!is_writable(dirname($file))) self::markTestSkipped(dirname($file).' must be writable for this test'); @@ -77,4 +77,3 @@ class TXmlDocumentTest extends PHPUnit_Framework_TestCase { if (is_file($file)) unlink ($file); } } -?> diff --git a/tests/unit/Xml/TXmlElementListTest.php b/tests/unit/Xml/TXmlElementListTest.php index b124dfbe..7667c64d 100644 --- a/tests/unit/Xml/TXmlElementListTest.php +++ b/tests/unit/Xml/TXmlElementListTest.php @@ -23,7 +23,7 @@ class TXmlElementListTest extends PHPUnit_Framework_TestCase { $newElement=new TXmlElement('newTag'); $list->insertAt(0,$newElement); self::assertEquals($newElement,$list->itemAt(0)); - + } public function testRemoveAt() { @@ -34,4 +34,3 @@ class TXmlElementListTest extends PHPUnit_Framework_TestCase { self::assertEquals($newElement,$list->removeAt(0)); } } -?> diff --git a/tests/unit/Xml/TXmlElementTest.php b/tests/unit/Xml/TXmlElementTest.php index d7b86832..49cae36f 100644 --- a/tests/unit/Xml/TXmlElementTest.php +++ b/tests/unit/Xml/TXmlElementTest.php @@ -7,7 +7,7 @@ Prado::using('System.Xml.TXmlDocument'); */ class TXmlElementTest extends PHPUnit_Framework_TestCase { - public function setUp() { + public function setUp() { } public function testConstruct() { @@ -80,4 +80,3 @@ class TXmlElementTest extends PHPUnit_Framework_TestCase { self::assertEquals('<tag key="value">value</tag>', (string)$element); } } -?> |