function QueryParameterTest::testGetArgument
Same name and namespace in other branches
- 11.x core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php \Drupal\Tests\views\Unit\Plugin\argument_default\QueryParameterTest::testGetArgument()
- 10 core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php \Drupal\Tests\views\Unit\Plugin\argument_default\QueryParameterTest::testGetArgument()
- 9 core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php \Drupal\Tests\views\Unit\Plugin\argument_default\QueryParameterTest::testGetArgument()
- 8.9.x core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php \Drupal\Tests\views\Unit\Plugin\argument_default\QueryParameterTest::testGetArgument()
Tests the getArgument() method.
Attributes
#[DataProvider('providerGetArgument')]
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ argument_default/ QueryParameterTest.php, line 31
Class
Namespace
Drupal\Tests\views\Unit\Plugin\argument_defaultCode
public function testGetArgument($options, Request $request, $expected) : void {
$view = new ViewExecutable($this->createStub(ViewEntityInterface::class), $this->createStub(AccountInterface::class), $this->createStub(ViewsData::class), $this->createStub(RouteProviderInterface::class), $this->createStub(ViewsPluginManager::class));
$view->setRequest($request);
$display_plugin = $this->createStub(DisplayPluginBase::class);
$raw = new QueryParameter([], 'query_parameter', []);
$raw->init($view, $display_plugin, $options);
$this->assertEquals($expected, $raw->getArgument());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.