stevseea Mon May 19 12:48:18 2008 UTC
Added files: (Branch: PHP_5_3)
/php-src/ext/dom/tests DOMElement_hasAttributes_basic.phpt
DOMDocument_createAttribute_variation.phpt
DOMDocument_createAttribute_error1.phpt
DOMDocument_createAttribute_error.phpt
DOMComment_appendData_basic.phpt
DOMDocument_createAttribute_basic.phpt
Removed files:
/php-src/ext/dom DOMComment_appendData_basic.phpt
DOMElement_hasAttributes_basic.phpt
DOMDocument_createAttribute_error.phpt
DOMDocument_createAttribute_error1.phpt
DOMDocument_createAttribute_variation.phpt
DOMDocument_createAttribute_basic.phpt
Log:
Moving DOM tests to correct folder.
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMElement_hasAttributes_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/dom/tests/DOMElement_hasAttributes_basic.phpt
+++ php-src/ext/dom/tests/DOMElement_hasAttributes_basic.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createAttribute_variation.phpt?view=markup&rev=1.1
Index: php-src/ext/dom/tests/DOMDocument_createAttribute_variation.phpt
+++ php-src/ext/dom/tests/DOMDocument_createAttribute_variation.phpt
--TEST--
Test DOMDocument::createAttribute() for expected return value
--FILE--
<?php
$dom = new DOMDocument();
$attr = $dom->createAttribute('string');
echo get_class($attr);
?>
--EXPECTF--
DOMAttr
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createAttribute_error1.phpt?view=markup&rev=1.1
Index: php-src/ext/dom/tests/DOMDocument_createAttribute_error1.phpt
+++ php-src/ext/dom/tests/DOMDocument_createAttribute_error1.phpt
--TEST--
DomDocument::createAttribute() - error test for DomDocument::createAttribute()
--CREDITS--
Muhammad Khalid Adnan
# TestFest 2008
--FILE--
<?php
$doc = new DOMDocument;
$node = $doc->createElement("para");
$newnode = $doc->appendChild($node);
try {
$failed_test_attribute = $doc->createAttribute("ha haha");
$node->appendChild($failed_test_attribute);
echo $doc->saveXML();
}
catch (DOMException $e) {
echo 'Test failed!', PHP_EOL;
}
?>
--EXPECT--
Test failed!
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createAttribute_error.phpt?view=markup&rev=1.1
Index: php-src/ext/dom/tests/DOMDocument_createAttribute_error.phpt
+++ php-src/ext/dom/tests/DOMDocument_createAttribute_error.phpt
--TEST--
Test DOMDocument::createAttribute() for expected expection thrown when wrong
parameter passed
--FILE--
<?php
$dom = new DOMDocument();
try {
$attr = $dom->createAttribute(0);
}
catch(DOMException $e) {
$code = $e->getCode();
if(DOM_INVALID_CHARACTER_ERR === $code) {
echo "PASS";
}
else {
echo 'Wrong exception code';
}
}
catch(Exception $e) {
echo 'Wrong exception thrown';
}
?>
--EXPECTF--
PASS
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMComment_appendData_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/dom/tests/DOMComment_appendData_basic.phpt
+++ php-src/ext/dom/tests/DOMComment_appendData_basic.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/DOMDocument_createAttribute_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/dom/tests/DOMDocument_createAttribute_basic.phpt
+++ php-src/ext/dom/tests/DOMDocument_createAttribute_basic.phpt
--TEST--
DomDocument::createAttribute() - basic test for DomDocument::createAttribute()
--CREDITS--
Muhammad Khalid Adnan
# TestFest 2008
--FILE--
<?php
$doc = new DOMDocument;
$node = $doc->createElement("para");
$newnode = $doc->appendChild($node);
// A pass case.
$test_attribute = $doc->createAttribute("hahaha");
$node->appendChild($test_attribute);
echo $doc->saveXML();
?>
--EXPECT--
<?xml version="1.0"?>
<para hahaha=""/>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php