<?php declare(strict_types=1); namespace Doctrine\Tests\Common\Lexer; use Doctrine\Common\Lexer\Token; use PHPUnit\Framework\TestCase; final class TokenTest extends TestCase { public function testIsA(): void { /** @var Token<'string'|'int', string> $token */ $token = new Token('foo', 'string', 1); self::assertTrue($token->isA('string')); self::assertTrue($token->isA('int', 'string')); self::assertFalse($token->isA('int')); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
AbstractLexerTest.php | File | 9.66 KB | 0644 |
|
ConcreteLexer.php | File | 962 B | 0644 |
|
EnumLexer.php | File | 944 B | 0644 |
|
MutableLexer.php | File | 754 B | 0644 |
|
TokenTest.php | File | 488 B | 0644 |
|
TokenType.php | File | 142 B | 0644 |
|