/**
* Tests the getContentType() method when a priority format is found.
*
* @dataProvider priorityFormatProvider
* @covers ::getContentType
*/
public function testAPriorityFormatIsFound($priority, $format)
{
$request = new Request();
$request->setFormat($format['format'], $format['mime_type']);
$request->headers->set('Accept', sprintf('%s,application/json', $format['mime_type']));
$this->assertSame($priority, $this->contentNegotiation->getContentType($request));
}