function FieldTest::testClickSortWithOutConfiguredColumn

Same name in other branches
  1. 9 core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php \Drupal\Tests\views\Unit\Plugin\field\FieldTest::testClickSortWithOutConfiguredColumn()
  2. 10 core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php \Drupal\Tests\views\Unit\Plugin\field\FieldTest::testClickSortWithOutConfiguredColumn()
  3. 11.x core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php \Drupal\Tests\views\Unit\Plugin\field\FieldTest::testClickSortWithOutConfiguredColumn()

@dataProvider providerSortOrders

Parameters

string $order: The sort order.

File

core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php, line 318

Class

FieldTest
@coversDefaultClass \Drupal\views\Plugin\views\field\EntityField @group views

Namespace

Drupal\Tests\views\Unit\Plugin\field

Code

public function testClickSortWithOutConfiguredColumn($order) {
    $definition = [
        'entity_type' => 'test_entity',
        'field_name' => 'title',
    ];
    $handler = new EntityField([], 'field', $definition, $this->entityTypeManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer, $this->entityRepository, $this->entityFieldManager);
    $handler->view = $this->executable;
    $this->entityFieldManager
        ->expects($this->never())
        ->method('getFieldStorageDefinitions');
    $handler->clickSort($order);
}

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