You are here

public function StandardTest::testToString in Views XML Backend 8

Same name in this branch
  1. 8 tests/src/Unit/Plugin/views/filter/StandardTest.php \Drupal\Tests\views_xml_backend\Unit\Plugin\views\filter\StandardTest::testToString()
  2. 8 tests/src/Unit/Plugin/views/argument/StandardTest.php \Drupal\Tests\views_xml_backend\Unit\Plugin\views\argument\StandardTest::testToString()

@covers ::__toString

File

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

Class

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

Namespace

Drupal\Tests\views_xml_backend\Unit\Plugin\views\argument

Code

public function testToString() {
  $plugin = new Standard([], '', []);
  $options = [
    'xpath_selector' => 'xpath_query',
  ];
  $plugin
    ->init($this
    ->getMockedView(), $this
    ->getMockedDisplay(), $options);
  $plugin->argument = '"foo"';
  $this
    ->assertSame('xpath_query = \'"foo"\'', (string) $plugin);
}