public function ArgumentValidatorTest::testArgumentValidateNumeric in Drupal 8
Same name and namespace in other branches
- 9 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 safed argument validation.
$view->argument['null']->argument_validated = NULL;
$this
->assertTrue($view->argument['null']
->validateArgument(12));
}