mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- tiny changes to testscript and domxml
This commit is contained in:
parent
9318964f25
commit
dd4f37a4cf
3 changed files with 14 additions and 13 deletions
|
@ -1317,8 +1317,9 @@ PHP_FUNCTION(xmltree)
|
|||
if((*keydata)->type == IS_OBJECT) {
|
||||
if (zend_hash_find((*keydata)->value.obj.properties, "type", sizeof("type"), (void **)&prop) == SUCCESS) {
|
||||
if((*prop)->value.lval == XML_ELEMENT_NODE) {
|
||||
root = *keydata;
|
||||
zend_hash_update(return_value->value.obj.properties, "root", strlen("root")+1, (void *) &root, sizeof(zval *), NULL);
|
||||
zend_hash_update(return_value->value.obj.properties, "root", strlen("root")+1, (void *) &(*keydata), sizeof(zval *), NULL);
|
||||
// (*keydata)->is_ref = 1;
|
||||
// (*keydata)->refcount = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ $rootnode = $dom->root();
|
|||
/* This one creates a dom tree made of php objects */
|
||||
echo "Test 2: creating a tree with php objects\n";
|
||||
$dom = xmltree($xmlstr);
|
||||
//$dom->root->name = "section";
|
||||
$dom->root->name = "section";
|
||||
var_dump($dom);
|
||||
echo $dom->root->name;
|
||||
echo "\n";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?
|
||||
$id = 190867; // A plain/text document
|
||||
$id = 187852; // A plain/text document
|
||||
$collid = 169828; // A collection
|
||||
$query = "Name=m*"; // Search query for test_9
|
||||
$host = "gehtnix";
|
||||
$username = "steinm";
|
||||
$password = "akli9132";
|
||||
$password = "";
|
||||
|
||||
$connect = hw_connect($host, 418, $username, $password);
|
||||
if(hw_error($connect)) {
|
||||
|
@ -14,14 +14,14 @@
|
|||
|
||||
// Set all test to 'yes' if they shall be executed
|
||||
$test_1 = "yes"; // Get the text document with id $id and output it
|
||||
$test_2 = "yes"; // Check if id $id is in $collid
|
||||
$test_3 = "yes"; // Convert object record to object array and back
|
||||
$test_4 = "yes"; // Get object record of object with id $id
|
||||
$test_5 = "yes"; // List children of $collid
|
||||
$test_6 = "yes"; // List parents of $id
|
||||
$test_7 = "yes"; // Insert a new text document
|
||||
$test_8 = "yes"; // Remove the just inserted text document
|
||||
$test_9 = "yes"; // Searching for objects with Name $query
|
||||
$test_2 = "no"; // Check if id $id is in $collid
|
||||
$test_3 = "no"; // Convert object record to object array and back
|
||||
$test_4 = "no"; // Get object record of object with id $id
|
||||
$test_5 = "no"; // List children of $collid
|
||||
$test_6 = "no"; // List parents of $id
|
||||
$test_7 = "no"; // Insert a new text document
|
||||
$test_8 = "no"; // Remove the just inserted text document
|
||||
$test_9 = "no"; // Searching for objects with Name $query
|
||||
|
||||
/* Lists an object array
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue