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