function ViewsArgumentValidatorTest::testArgumentValidatePhp

File

tests/views_argument_validator.test, line 27

Class

ViewsArgumentValidatorTest
Tests Views argument validators.

Code

public function testArgumentValidatePhp() {
    $string = $this->randomName();
    $view = $this->view_test_argument_validate_php($string);
    $view->set_display('default');
    $view->pre_execute();
    $view->init_handlers();
    $this->assertTrue($view->argument['null']
        ->validate_arg($string));
    // Reset safed argument validation.
    $view->argument['null']->argument_validated = NULL;
    $this->assertFalse($view->argument['null']
        ->validate_arg($this->randomName()));
}