function ViewsArgumentValidatorTest::testArgumentValidateNumeric in Views (for Drupal 7) 7.3
File
- tests/
views_argument_validator.test, line 32 - Definition of ViewsArgumentValidatorTest.
Class
- ViewsArgumentValidatorTest
- Tests Views argument validators.
Code
function testArgumentValidateNumeric() {
$view = $this
->view_argument_validate_numeric();
$view
->set_display('default');
$view
->pre_execute();
$view
->init_handlers();
$this
->assertFalse($view->argument['null']
->validate_arg($this
->randomString()));
// Reset safed argument validation.
$view->argument['null']->argument_validated = NULL;
$this
->assertTrue($view->argument['null']
->validate_arg(12));
}