function ArgumentValidatorTest::testArgumentValidateNumeric
Same name in other branches
- 8.9.x core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php \Drupal\Tests\views\Kernel\Plugin\ArgumentValidatorTest::testArgumentValidateNumeric()
- 10 core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php \Drupal\Tests\views\Kernel\Plugin\ArgumentValidatorTest::testArgumentValidateNumeric()
- 11.x core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php \Drupal\Tests\views\Kernel\Plugin\ArgumentValidatorTest::testArgumentValidateNumeric()
File
-
core/
modules/ views/ tests/ src/ Kernel/ Plugin/ ArgumentValidatorTest.php, line 23
Class
- ArgumentValidatorTest
- Tests Views argument validators.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public function testArgumentValidateNumeric() {
$view = Views::getView('test_view_argument_validate_numeric');
$view->initHandlers();
$this->assertFalse($view->argument['null']
->validateArgument($this->randomString()));
// Reset saved argument validation.
$view->argument['null']->argument_validated = NULL;
$this->assertTrue($view->argument['null']
->validateArgument(12));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.