class TokenTest in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 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\TokenView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TokenTest:: |
public | function | Test Token invalid description exception. | |
TokenTest:: |
public | function | Test Token invalid token exception. |