1 views_argument_validator.test ViewsArgumentValidatorTest::testArgumentValidateNumeric()

File

core/modules/views/tests/views_argument_validator.test, line 26
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));
}