public function AcceptHeaderItemTest::testQuality in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/AcceptHeaderItemTest.php \Symfony\Component\HttpFoundation\Tests\AcceptHeaderItemTest::testQuality()
File
- vendor/
symfony/ http-foundation/ Tests/ AcceptHeaderItemTest.php, line 85
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testQuality() {
$item = new AcceptHeaderItem('value', array());
$this
->assertEquals(1.0, $item
->getQuality());
$item
->setQuality(0.5);
$this
->assertEquals(0.5, $item
->getQuality());
$item
->setAttribute('q', 0.75);
$this
->assertEquals(0.75, $item
->getQuality());
$this
->assertFalse($item
->hasAttribute('q'));
}