/** * 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'])); }
/** * 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()); }