/** @dataProvider getGetDoctypeTriggersWarningWhenInvalidData */ public function testGetDoctypeTriggersWarningWhenInvalid($format, $msg) { $node = new Doctype(array('lineno' => 0, 'column' => 0), 'invalid', null); $e = null; try { $node->getDoctype($format); } catch (\Exception $e) { } $this->assertNotNull($e); $this->assertInstanceOf('PHPUnit_Framework_Error_Warning', $e); $this->assertSame($msg, $e->getMessage()); }
public function enterDoctype(Doctype $node) { $doctype = $node->getDoctype($this->env->getOption('format')); $this->write($this->escapeLanguage($doctype)); }