You are here

public function AcceptHeaderTest::testFromString in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/AcceptHeaderTest.php \Symfony\Component\HttpFoundation\Tests\AcceptHeaderTest::testFromString()

@dataProvider provideFromStringData

File

vendor/symfony/http-foundation/Tests/AcceptHeaderTest.php, line 28

Class

AcceptHeaderTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testFromString($string, array $items) {
  $header = AcceptHeader::fromString($string);
  $parsed = array_values($header
    ->all());

  // reset index since the fixtures don't have them set
  foreach ($parsed as $item) {
    $item
      ->setIndex(0);
  }
  $this
    ->assertEquals($items, $parsed);
}