public function AcceptHeaderTest::testFromString

@dataProvider provideFromStringData

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/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);
}