You are here

class TokenTest in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/core_event_dispatcher/tests/src/Unit/Token/TokenTest.php \Drupal\Tests\core_event_dispatcher\Unit\Token\TokenTest

Class TokenTest.

@group hook_event_dispatcher

Hierarchy

  • class \Drupal\Tests\core_event_dispatcher\Unit\Token\TokenTest extends \PHPUnit\Framework\TestCase

Expanded class hierarchy of TokenTest

File

modules/core_event_dispatcher/tests/src/Unit/Token/TokenTest.php, line 14

Namespace

Drupal\Tests\core_event_dispatcher\Unit\Token
View source
class TokenTest extends TestCase {

  /**
   * Test Token invalid token exception.
   */
  public function testTokenInvalidNameException() : void {
    $this
      ->expectException(UnexpectedValueException::class);
    Token::create('', '', NULL);
  }

  /**
   * Test Token invalid description exception.
   */
  public function testTokenInvalidDescriptionException() : void {
    $this
      ->expectException(UnexpectedValueException::class);
    Token::create('', '', '')
      ->setDescription(NULL);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TokenTest::testTokenInvalidDescriptionException public function Test Token invalid description exception.
TokenTest::testTokenInvalidNameException public function Test Token invalid token exception.