public function NumericTest::testToString in Views XML Backend 8
@covers ::__toString
File
- tests/
src/ Unit/ Plugin/ views/ argument/ NumericTest.php, line 22 - Contains \Drupal\Tests\views_xml_backend\Unit\Plugin\views\argument\NumericTest.
Class
- NumericTest
- @coversDefaultClass \Drupal\views_xml_backend\Plugin\views\argument\Numeric @group views_xml_backend
Namespace
Drupal\Tests\views_xml_backend\Unit\Plugin\views\argumentCode
public function testToString() {
$plugin = new Numeric([], '', []);
$options = [
'xpath_selector' => 'xpath_query',
];
$plugin
->init($this
->getMockedView(), $this
->getMockedDisplay(), $options);
$plugin->argument = 4;
$this
->assertSame("xpath_query = '4'", (string) $plugin);
}