You are here

function ViewsArgumentValidatorTest::testArgumentValidatePhpFailure in Views (for Drupal 7) 7.3

Make sure argument validation works properly.

File

tests/views_argument_validator.test, line 46
Definition of ViewsArgumentValidatorTest.

Class

ViewsArgumentValidatorTest
Tests Views argument validators.

Code

function testArgumentValidatePhpFailure() {
  $view = $this
    ->view_test_argument_validate_php_failure();
  $view
    ->save();
  $this
    ->drupalGet('test-php-failure');

  // This should return a 403, indicating that the arguments validation fails.
  $this
    ->assertResponse(403);
  $this
    ->drupalGet('test-php-failure-feed');

  // This should return a 403, indicating that the arguments validation fails.
  $this
    ->assertResponse(403);
}