Skip to content

Commit 0fee316

Browse files
author
Kirill Nesmeyanov
committed
Improve parser tests
1 parent 408fffe commit 0fee316

File tree

12 files changed

+28
-6
lines changed

12 files changed

+28
-6
lines changed

tests/Functional/LinterStubs/LinterStubsTestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
use Phplrt\Position\Position;
1212
use Phplrt\Source\File;
1313
use PHPUnit\Framework\Attributes\DataProvider;
14+
use PHPUnit\Framework\Attributes\Group;
1415
use TypeLang\Parser\Tests\Concern\InteractWithDocBlocks;
1516
use TypeLang\Parser\Tests\Functional\TestCase;
1617

18+
#[Group('functional'), Group('type-lang/parser')]
1719
abstract class LinterStubsTestCase extends TestCase
1820
{
1921
use InteractWithDocBlocks;

tests/Functional/LinterStubs/PhpStanStubsTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace TypeLang\Parser\Tests\Functional\LinterStubs;
66

7+
use PHPUnit\Framework\Attributes\Group;
8+
9+
#[Group('functional'), Group('type-lang/parser')]
710
class PhpStanStubsTest extends LinterStubsTestCase
811
{
912
protected static function getCachePathname(): string

tests/Functional/LinterStubs/PsalmStubsTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace TypeLang\Parser\Tests\Functional\LinterStubs;
66

7+
use PHPUnit\Framework\Attributes\Group;
8+
9+
#[Group('functional'), Group('type-lang/parser')]
710
class PsalmStubsTest extends LinterStubsTestCase
811
{
912
protected static function getCachePathname(): string

tests/Functional/TestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
namespace TypeLang\Parser\Tests\Functional;
66

7+
use PHPUnit\Framework\Attributes\Group;
78
use TypeLang\Parser\Tests\TestCase as BaseTestCase;
89

10+
#[Group('functional'), Group('type-lang/parser')]
911
abstract class TestCase extends BaseTestCase
1012
{
1113
}

tests/TestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
namespace TypeLang\Parser\Tests;
66

7+
use PHPUnit\Framework\Attributes\Group;
78
use TypeLang\Parser\Tests\Concern\CompileGrammarIfPossible;
89
use TypeLang\Parser\Tests\Concern\InteractWithParser;
910
use PHPUnit\Framework\TestCase as BaseTestCase;
1011

12+
#[Group('type-lang/parser')]
1113
abstract class TestCase extends BaseTestCase
1214
{
1315
use CompileGrammarIfPossible;

tests/Unit/ArrayShapesTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
namespace TypeLang\Parser\Tests\Unit;
66

7+
use PHPUnit\Framework\Attributes\Group;
78
use TypeLang\Parser\Tests\TestCase;
89

10+
#[Group('unit'), Group('type-lang/parser')]
911
class ArrayShapesTest extends TestCase
1012
{
1113
public function testFields(): void

tests/Unit/GenericsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
namespace TypeLang\Parser\Tests\Unit;
66

7+
use PHPUnit\Framework\Attributes\Group;
78
use TypeLang\Parser\Tests\TestCase;
89

10+
#[Group('unit'), Group('type-lang/parser')]
911
class GenericsTest extends TestCase
1012
{
1113
public function testArguments(): void

tests/Unit/LiteralsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
namespace TypeLang\Parser\Tests\Unit;
66

77
use PHPUnit\Framework\Attributes\DataProvider;
8+
use PHPUnit\Framework\Attributes\Group;
89
use TypeLang\Parser\Node\Literal\BoolLiteralNode;
910
use TypeLang\Parser\Node\Literal\FloatLiteralNode;
1011
use TypeLang\Parser\Node\Literal\IntLiteralNode;
1112
use TypeLang\Parser\Node\Literal\NullLiteralNode;
1213
use TypeLang\Parser\Node\Literal\StringLiteralNode;
1314
use TypeLang\Parser\Tests\TestCase;
1415

16+
#[Group('unit'), Group('type-lang/parser')]
1517
class LiteralsTest extends TestCase
1618
{
1719
#[DataProvider('floatLiteralsDataProvider')]

tests/Unit/NamesTypeTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
namespace TypeLang\Parser\Tests\Unit;
66

7+
use PHPUnit\Framework\Attributes\Group;
78
use TypeLang\Parser\Tests\TestCase;
89

10+
#[Group('unit'), Group('type-lang/parser')]
911
class NamesTypeTest extends TestCase
1012
{
1113
public function testSimpleType(): void

tests/Unit/TestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace TypeLang\Parser\Tests\Unit;
66

7+
use PHPUnit\Framework\Attributes\Group;
78
use TypeLang\Parser\Tests\TestCase as BaseTestCase;
89

9-
abstract class TestCase extends BaseTestCase
10-
{
11-
}
10+
#[Group('unit'), Group('type-lang/parser')]
11+
abstract class TestCase extends BaseTestCase {}

0 commit comments

Comments
 (0)