예제 #1
0
 /**
  * Test with the `ArrayAccess` interface if an attribute can be unset.
  */
 public function testOffsetUnset()
 {
     $doc = new XMLDocument();
     $config = $doc->root('config');
     $config['attr'] = true;
     unset($config['attr']);
     $this->assertFalse(isset($config['attr']));
 }
예제 #2
0
 /**
  * Test if the `toString` method returns a node value as string.
  */
 public function testToStringReturnsStringValue()
 {
     $doc = new XMLDocument();
     $doc->root('config')->attribute('email', '*****@*****.**');
     $this->assertSame('*****@*****.**', $doc('#/config/@email')->toString());
 }