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