I'm about to make a pull request for a small bug while discovered the following and want to clarify first. Currently there's only one place where this is found in LanguageNegotiatorTest:
public function testGetBestDoesNotMatchPriorities()
{
$acceptLanguageHeader = 'en, de';
$priorities = array('fr');
$acceptHeader = $this->negotiator->getBest($acceptLanguageHeader, $priorities);
$this->assertInstanceOf('Negotiation\AcceptHeader', $acceptHeader);
$this->assertEquals('en', $acceptHeader->getValue());
}
Basically what happens is: the client says I will accept only en or de, but the only thing we can offer is fr. The rational action is to return null as we can't satisfy the request, but we return en instead (which we can't provide). I am assuming the way this works is wrong?
I'm about to make a pull request for a small bug while discovered the following and want to clarify first. Currently there's only one place where this is found in LanguageNegotiatorTest:
Basically what happens is: the client says I will accept only
en
orde
, but the only thing we can offer isfr
. The rational action is to returnnull
as we can't satisfy the request, but we returnen
instead (which we can't provide). I am assuming the way this works is wrong?