Lines Matching refs:token
7 $token = new Token(\ord(','), ',');
8 $this->assertSame(',', $token->getTokenName());
9 $token = new Token(\T_WHITESPACE, ' ');
10 $this->assertSame('T_WHITESPACE', $token->getTokenName());
14 $token = new Token(\ord(','), ',');
15 $this->assertTrue($token->is(\ord(',')));
16 $this->assertFalse($token->is(\ord(';')));
17 $this->assertTrue($token->is(','));
18 $this->assertFalse($token->is(';'));
19 $this->assertTrue($token->is([\ord(','), \ord(';')]));
20 $this->assertFalse($token->is([\ord('!'), \ord(';')]));
21 $this->assertTrue($token->is([',', ';']));
22 $this->assertFalse($token->is(['!', ';']));
27 $token = new Token($id, $text);
28 $this->assertSame($isIgnorable, $token->isIgnorable());
42 $token = new Token(\ord(','), ',');
43 $this->assertSame(',', (string) $token);
44 $token = new Token(\T_STRING, 'foo');
45 $this->assertSame('foo', (string) $token);