function SortTest::testCreateFromQueryParameterFail

Same name in other branches
  1. 8.9.x core/modules/jsonapi/tests/src/Unit/Query/SortTest.php \Drupal\Tests\jsonapi\Unit\Query\SortTest::testCreateFromQueryParameterFail()
  2. 10 core/modules/jsonapi/tests/src/Unit/Query/SortTest.php \Drupal\Tests\jsonapi\Unit\Query\SortTest::testCreateFromQueryParameterFail()
  3. 11.x core/modules/jsonapi/tests/src/Unit/Query/SortTest.php \Drupal\Tests\jsonapi\Unit\Query\SortTest::testCreateFromQueryParameterFail()

@covers ::createFromQueryParameter @dataProvider badParameterProvider

File

core/modules/jsonapi/tests/src/Unit/Query/SortTest.php, line 86

Class

SortTest
@coversDefaultClass \Drupal\jsonapi\Query\Sort @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Query

Code

public function testCreateFromQueryParameterFail($input) {
    $this->expectException(BadRequestHttpException::class);
    Sort::createFromQueryParameter($input);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.