function ArgumentValidatorTest::testArgumentValidateNumeric in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Plugin/ArgumentValidatorTest.php \Drupal\views\Tests\Plugin\ArgumentValidatorTest::testArgumentValidateNumeric()
File
- core/
modules/ views/ src/ Tests/ Plugin/ ArgumentValidatorTest.php, line 28 - Contains \Drupal\views\Tests\Plugin\ArgumentValidatorTest.
Class
- ArgumentValidatorTest
- Tests Views argument validators.
Namespace
Drupal\views\Tests\PluginCode
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));
}