packages/bison-parser/tests/Unit/Ast/Rule/EmptyItemTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Ast\Rule;
6
7use BisonParser\Ast\Location;
8use BisonParser\Ast\Rule\EmptyItem;
9use PHPUnit\Framework\Attributes\CoversClass;
10use PHPUnit\Framework\Attributes\Small;
11use PHPUnit\Framework\Attributes\UsesClass;
12use PHPUnit\Framework\TestCase;
13
14#[CoversClass(EmptyItem::class)]
15#[UsesClass(Location::class)]
16#[Small]
17final class EmptyItemTest extends TestCase
18{
19    public function testLocation(): void
20    {
21        $item = new EmptyItem(new Location(5, 9));
22
23        self::assertSame('5:9', (string) $item->location());
24    }
25}
26