NoneTest.php
Same filename and directory in other branches
Namespace
Drupal\Tests\views\Unit\Plugin\argument_validatorFile
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ argument_validator/ NoneTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\views\Unit\Plugin\argument_validator;
use Drupal\Tests\UnitTestCase;
use Drupal\views\Plugin\views\argument\Standard;
use Drupal\views\Plugin\views\argument_validator\None;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\TestWith;
/**
* Tests the None argument validator.
*/
class NoneTest extends UnitTestCase {
/**
* Tests validation of the None argument.
*/
public function testValidateNone(bool $expected, mixed $argument, array $definition, array $options) : void {
$argument_handler = new Standard([], 'standard', []);
$argument_handler->definition = $definition;
$argument_handler->options = $options;
$validator = new None([], 'none_test', []);
$validator->setArgument($argument_handler);
$this->assertSame($expected, $validator->validateArgument($argument));
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| NoneTest | Tests the None argument validator. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.