php-src/ext/simplexml/tests/001.phpt
Sterling Hughes 94925b1c33 add very basic code for the simplexml extension. The following works ::
person.xml
--
<person>
 <name>
  <first>Sterling</first>
  <last>Hughes</last>
 </name>
</person>

person.php
--
<?php
$p = simplexml_load_file('person.xml');
echo $p->name->last . ', ' . $p->name->first;
?>

Still needs lots of work.
2003-05-18 20:33:26 +00:00

25 lines
578 B
PHP

--TEST--
Check for simplexml presence
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--POST--
--GET--
--INI--
--FILE--
<?php
echo "simplexml extension is available";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php4/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
simplexml extension is available