comparison vendor/theseer/tokenizer/tests/TokenizerTest.php @ 2:5311817fb629

Theme updates
author Chris Cannam
date Tue, 10 Jul 2018 13:19:18 +0000
parents
children
comparison
equal deleted inserted replaced
1:0b0e5f3b1e83 2:5311817fb629
1 <?php declare(strict_types = 1);
2 namespace TheSeer\Tokenizer;
3
4 use PHPUnit\Framework\TestCase;
5
6 /**
7 * @covers \TheSeer\Tokenizer\Tokenizer
8 */
9 class TokenizerTest extends TestCase {
10
11 public function testValidSourceGetsParsed() {
12 $tokenizer = new Tokenizer();
13 $result = $tokenizer->parse(file_get_contents(__DIR__ . '/_files/test.php'));
14
15 $expected = unserialize(
16 file_get_contents(__DIR__ . '/_files/test.php.tokens'),
17 [TokenCollection::class]
18 );
19 $this->assertEquals($expected, $result);
20 }
21 }