public function AjaxControllerTest::testAnyOrderNotInPager in Sortableviews 8
Tests adjusted order for entities when not in pager.
@covers ::retrieveOrderFromRequest
File
- tests/
src/ Unit/ Controller/ AjaxControllerTest.php, line 115
Class
- AjaxControllerTest
- @coversDefaultClass \Drupal\sortableviews\Controller\AjaxController @group sortableviews
Namespace
Drupal\Tests\sortableviews\Unit\ControllerCode
public function testAnyOrderNotInPager() {
// Test order when not in a pager.
$request = new Request();
$page = [
2,
4,
6,
8,
];
$request->attributes
->set('current_order', $page);
$result = $this->method
->invokeArgs($this->ajaxController, [
$request,
]);
$this
->assertEquals($page, $result);
}