Adding some constraints about PK

This commit is contained in:
Chouchen
2010-10-08 16:18:41 +00:00
parent 0e49600951
commit 0b54511565
3 changed files with 27 additions and 10 deletions

View File

@@ -66,8 +66,18 @@ else
echo 'Testing select visibility = true and x = 32 (experimental - should find 1)<br/>';
$result = $xmldbtest->selectFromChilds('table1',array('visibility'=>'true', 'x'=>'32'));
echo count($result).' results<br/><br/>';
echo '<br/>Testing insertNode that already exist (should do "ko")<br/>';
if($xmldbtest->insertNode(array('name'=>'item', 'attributes'=>array('id'=>'test'), 'childs'=>array('visibility'=>'true', 'x'=>'33')), 'table1'))
echo "ok<br/><br/>";
else
echo "ko<br/><br/>";
echo '<br/>Testing insertNode that doesn\'t exist (should do "ok")<br/>';
if($xmldbtest->insertNode(array('name'=>'item', 'attributes'=>array('id'=>'test2'), 'childs'=>array('visibility'=>'true', 'x'=>'33')), 'table1'))
echo "ok<br/><br/>";
else
echo "ko<br/><br/>";
echo '<br/>Testing updatingNodeAttribute with no insert (should be ok and change the item "links" into "zelda" haha)<br/>';
if($xmldbtest->updateNodeAttribute('table1', array('id', 'links'), array('id', 'zelda')))