You are here

protected function ViewsXmlBackendTestBase::getMockedDisplay in Views XML Backend 8

12 calls to ViewsXmlBackendTestBase::getMockedDisplay()
DateTest::testRenderItem in tests/src/Unit/Plugin/views/sort/DateTest.php
@covers ::query
DateTest::testRenderItem in tests/src/Unit/Plugin/views/field/DateTest.php
@covers ::render_item
MarkupTest::testRenderItem in tests/src/Unit/Plugin/views/field/MarkupTest.php
@covers ::render_item
NumericTest::testRenderItem in tests/src/Unit/Plugin/views/filter/NumericTest.php
@covers ::__toString
NumericTest::testRenderItem in tests/src/Unit/Plugin/views/sort/NumericTest.php
@covers ::query

... See full list

File

tests/src/Unit/ViewsXmlBackendTestBase.php, line 52
Contains \Drupal\Tests\views_xml_backend\Unit\ViewsXmlBackendTestBase.

Class

ViewsXmlBackendTestBase
Base testing class.

Namespace

Drupal\Tests\views_xml_backend\Unit

Code

protected function getMockedDisplay() {
  if (isset($this->display)) {
    return $this->display
      ->reveal();
  }
  $this->display = $this
    ->prophesize(DisplayPluginBase::class);
  $this->display
    ->getArgumentsTokens()
    ->willReturn([]);
  $this->display
    ->getOption('relationships')
    ->willReturn(FALSE);
  return $this->display
    ->reveal();
}