/** * @dataProvider contentTypeProvider */ public function testContentTypeDetection($language, $dialect, $xhtml_1_0_compat, $expected) { # Cheat and set version to 1.0 if testing XHTML 1.0 compatibility $ctx = new RenderContext($language, $xhtml_1_0_compat ? 1.0 : null, $dialect); if ($xhtml_1_0_compat) { $ctx->setXHTMLCompatMode($xhtml_1_0_compat); } $this->assertSame($expected, $ctx->getContentType()); }