Negotiation\Tests\CharsetNegotiatorTest::testGetBest PHP Метод

testGetBest() публичный Метод

public testGetBest ( $accept, $priorities, $expected )
    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());
        }
    }