function FieldTest::getConfigFieldStorage

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

Returns a mocked configurable field storage object.

Return value

\Drupal\field\FieldStorageConfigInterface|\PHPUnit\Framework\MockObject\MockObject

4 calls to FieldTest::getConfigFieldStorage()
FieldTest::testCalculateDependenciesWithConfiguredField in core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php
@covers ::calculateDependencies
FieldTest::testClickSortWithConfiguredField in core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php
@dataProvider providerSortOrders
FieldTest::testPrepareItemsByDelta in core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php
@covers ::prepareItemsByDelta
FieldTest::testQueryWithGroupByForConfigField in core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php
@covers ::query

File

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

Class

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

Namespace

Drupal\Tests\views\Unit\Plugin\field

Code

protected function getConfigFieldStorage() {
    $title_storage = $this->createMock('Drupal\\field\\FieldStorageConfigInterface');
    $title_storage->expects($this->any())
        ->method('getColumns')
        ->willReturn([
        'value' => [
            'type' => 'varchar',
        ],
    ]);
    $title_storage->expects($this->any())
        ->method('getSettings')
        ->willReturn([]);
    $title_storage->expects($this->any())
        ->method('getConstraints')
        ->willReturn([]);
    return $title_storage;
}

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