class NoneTest

Same name and namespace in other branches
  1. main core/modules/views/tests/src/Unit/Plugin/argument_validator/NoneTest.php \Drupal\Tests\views\Unit\Plugin\argument_validator\NoneTest

Tests the None argument validator.

Attributes

#[CoversClass(None::class)] #[Group('views')]

Hierarchy

Expanded class hierarchy of NoneTest

File

core/modules/views/tests/src/Unit/Plugin/argument_validator/NoneTest.php, line 17

Namespace

Drupal\Tests\views\Unit\Plugin\argument_validator
View source
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));
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.