TokenTypeTest.php in Hook Event Dispatcher 3.x
File
modules/core_event_dispatcher/tests/src/Unit/Token/TokenTypeTest.php
View source
<?php
namespace Drupal\Tests\core_event_dispatcher\Unit\Token;
use Drupal\core_event_dispatcher\ValueObject\TokenType;
use PHPUnit\Framework\TestCase;
use UnexpectedValueException;
class TokenTypeTest extends TestCase {
public function testTokenTypeInvalidNameException() : void {
$this
->expectException(UnexpectedValueException::class);
TokenType::create('', NULL);
}
public function testTokenTypeInvalidDescriptionException() : void {
$this
->expectException(UnexpectedValueException::class);
TokenType::create('', '')
->setDescription(NULL);
}
}