/** * @expectedException DOMException */ public function testInvalidTarget() { $root = new SimpleDOM('<root />'); try { $root->insertPI('$$$', 'type="text/xsl" href="foo.xsl"'); } catch (DOMException $e) { $this->assertSame($e->code, DOM_INVALID_CHARACTER_ERR); throw $e; } }