withHeader("Content-Type", $header); $this->assertSame($exp, HTTP::matchType($msg, ...$types)); $msg = (new \Laminas\Diactoros\Response)->withHeader("Content-Type", $header); $this->assertSame($exp, HTTP::matchType($msg, ...$types)); } public function provideMediaTypes(): array { return [ ["application/json", ["application/json"], true], ["APPLICATION/JSON", ["application/json"], true], ["text/JSON", ["application/json", "text/json"], true], ["text/json; charset=utf-8", ["application/json", "text/json"], true], ["", ["application/json"], false], ["", ["application/json", ""], true], ["application/json ;", ["application/json"], true], ]; } }