/** * @covers CHttpRequest::compareAcceptTypes * @dataProvider acceptContentTypeArrayMapDataProvider */ public function testCompareAcceptTypes($a, $b, $result, $errorString = 'Compare of content type array maps did not give expected preference') { $this->assertEquals($result, CHttpRequest::compareAcceptTypes($a, $b), $errorString); // make sure that inverse comparison holds $this->assertEquals($result * -1, CHttpRequest::compareAcceptTypes($b, $a), '(Inverse) ' . $errorString); }