Skip to content

Commit 5de91dc

Browse files
add unit tests
1 parent 4c6270b commit 5de91dc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Exception;
6+
7+
use CleverAge\ProcessBundle\Exception\MissingTransformerException;
8+
use PHPUnit\Framework\TestCase;
9+
use UnexpectedValueException;
10+
11+
class MissingTransformerExceptionTest extends TestCase
12+
{
13+
/**
14+
* @covers \CleverAge\ProcessBundle\Exception\MissingTransformerException::create
15+
*/
16+
public function testCreate(): void
17+
{
18+
$exception = MissingTransformerException::create('my_transformer');
19+
20+
$this->assertInstanceOf(UnexpectedValueException::class, $exception);
21+
$this->assertEquals('No transformer with code : my_transformer', $exception->getMessage());
22+
}
23+
}

0 commit comments

Comments
 (0)