You are here

public function StandardTest::testClickSort in Views XML Backend 8

@covers ::clickSort

File

tests/src/Unit/Plugin/views/field/StandardTest.php, line 25
Contains \Drupal\Tests\views_xml_backend\Unit\Plugin\views\field\StandardTest.

Class

StandardTest
@coversDefaultClass \Drupal\views_xml_backend\Plugin\views\field\Standard @group views_xml_backend

Namespace

Drupal\Tests\views_xml_backend\Unit\Plugin\views\field

Code

public function testClickSort() {
  $plugin = new Standard([], '', []);
  $query = $this
    ->prophesize(Xml::class);
  $query
    ->addSort(Argument::type(StringSorter::class))
    ->shouldBeCalled();
  $plugin->query = $query
    ->reveal();
  $plugin
    ->clickSort('DESC');
}