function ViewsArgumentValidatorTest::testArgumentValidateNumeric
File
-
tests/
views_argument_validator.test, line 42
Class
- ViewsArgumentValidatorTest
- Tests Views argument validators.
Code
public 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));
}