public function EntityTest::testValidateArgumentNoAccess in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/Plugin/argument_validator/EntityTest.php \Drupal\Tests\views\Unit\Plugin\argument_validator\EntityTest::testValidateArgumentNoAccess()
Tests the validate argument method with no access and bundles.
See also
\Drupal\views\Plugin\views\argument_validator\Entity::validateArgument()
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ argument_validator/ EntityTest.php, line 120 - Contains \Drupal\Tests\views\Unit\Plugin\argument_validator\EntityTest.
Class
- EntityTest
- @coversDefaultClass \Drupal\views\Plugin\views\argument_validator\Entity @group views
Namespace
Drupal\Tests\views\Unit\Plugin\argument_validatorCode
public function testValidateArgumentNoAccess() {
$options = array();
$options['access'] = FALSE;
$options['bundles'] = array();
$this->argumentValidator
->init($this->executable, $this->display, $options);
$this
->assertFalse($this->argumentValidator
->validateArgument(3));
$this
->assertFalse($this->argumentValidator
->validateArgument(''));
$this
->assertTrue($this->argumentValidator
->validateArgument(1));
$this
->assertTrue($this->argumentValidator
->validateArgument(2));
$this
->assertFalse($this->argumentValidator
->validateArgument('1,2'));
}