Skip to content

Commit a6cb5c8

Browse files
committed
Add tests for the class hierarchies
1 parent 3dff61d commit a6cb5c8

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

tests/Unit/Parsing/OutputExceptionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,21 @@
66

77
use PHPUnit\Framework\TestCase;
88
use Sabberworm\CSS\Parsing\OutputException;
9+
use Sabberworm\CSS\Parsing\SourceException;
910

1011
/**
1112
* @covers \Sabberworm\CSS\Parsing\OutputException
1213
*/
1314
final class OutputExceptionTest extends TestCase
1415
{
16+
/**
17+
* @test
18+
*/
19+
public function extendsSourceException(): void
20+
{
21+
self::assertInstanceOf(SourceException::class, new OutputException('foo'));
22+
}
23+
1524
/**
1625
* @test
1726
*/

tests/Unit/Parsing/UnexpectedEOFExceptionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,21 @@
66

77
use PHPUnit\Framework\TestCase;
88
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
9+
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
910

1011
/**
1112
* @covers \Sabberworm\CSS\Parsing\UnexpectedEOFException
1213
*/
1314
final class UnexpectedEOFExceptionTest extends TestCase
1415
{
16+
/**
17+
* @test
18+
*/
19+
public function extendsUnexpectedTokenException(): void
20+
{
21+
self::assertInstanceOf(UnexpectedTokenException::class, new UnexpectedEOFException('expected', 'found'));
22+
}
23+
1524
/**
1625
* @test
1726
*/

tests/Unit/Parsing/UnexpectedTokenExceptionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,22 @@
55
namespace Sabberworm\CSS\Tests\Unit\Parsing;
66

77
use PHPUnit\Framework\TestCase;
8+
use Sabberworm\CSS\Parsing\SourceException;
89
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
910

1011
/**
1112
* @covers \Sabberworm\CSS\Parsing\UnexpectedTokenException
1213
*/
1314
final class UnexpectedTokenExceptionTest extends TestCase
1415
{
16+
/**
17+
* @test
18+
*/
19+
public function extendsSourceException(): void
20+
{
21+
self::assertInstanceOf(SourceException::class, new UnexpectedTokenException('expected', 'found'));
22+
}
23+
1524
/**
1625
* @test
1726
*/

0 commit comments

Comments
 (0)