public function testGetBest($accept, $priorities, $expected)
{
if (is_null($expected)) {
$this->setExpectedException('Negotiation\\Exception\\InvalidArgument');
}
$accept = $this->negotiator->getBest($accept, $priorities);
if (null === $accept) {
$this->assertNull($expected);
} else {
$this->assertInstanceOf('Negotiation\\AcceptCharset', $accept);
$this->assertSame($expected, $accept->getValue());
}
}