Implemented test for exception

This commit is contained in:
Kevin Frantz
2019-01-06 15:42:40 +01:00
parent c7c4e1c16e
commit 3ab9cb0e99
3 changed files with 17 additions and 1 deletions

View File

@@ -10,6 +10,8 @@ use App\Domain\SourceManagement\SourceMetaInformation;
use App\Domain\SourceManagement\SourceMetaInformationInterface;
use App\Domain\TemplateManagement\TemplatePathFormAndViewInterface;
use App\Domain\FormManagement\FormMetaInformationInterface;
use App\Entity\EntityInterface;
use App\Exception\NotCorrectInstanceException;
class SourceMetaInformationTest extends TestCase
{
@@ -79,4 +81,10 @@ class SourceMetaInformationTest extends TestCase
{
$this->assertInstanceOf(FormMetaInformationInterface::class, $this->sourceMetaInformation->getFormMetaInformation());
}
public function testTypeError(): void
{
$this->expectException(NotCorrectInstanceException::class);
new SourceMetaInformation($this->createMock(EntityInterface::class));
}
}