TokenTypeTest.php in Hook Event Dispatcher 8
File
tests/src/Unit/Token/TokenTypeTest.php
View source
<?php
namespace Drupal\Tests\hook_event_dispatcher\Unit\Token;
use Drupal\hook_event_dispatcher\Value\TokenType;
use Drupal\Tests\UnitTestCase;
class TokenTypeTest extends UnitTestCase {
public function testTokenTypeInvalidTypeException() {
$this
->setExpectedException(\UnexpectedValueException::class);
TokenType::create(NULL, '');
}
public function testTokenTypeInvalidNameException() {
$this
->setExpectedException(\UnexpectedValueException::class);
TokenType::create('', NULL);
}
public function testTokenTypeInvalidDescriptionException() {
$this
->setExpectedException(\UnexpectedValueException::class);
TokenType::create('', '')
->setDescription(NULL);
}
public function testTokenTypeInvalidNeedsDataException() {
$this
->setExpectedException(\UnexpectedValueException::class);
TokenType::create('', '')
->setNeedsData(TRUE);
}
}