mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Implemented test for exception
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Domain\SourceManagement;
|
||||
|
||||
use App\Domain\EntityManagement\EntityMetaInformation;
|
||||
use App\Entity\Source\AbstractSource;
|
||||
use App\Exception\NotCorrectInstanceException;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -22,7 +23,7 @@ final class SourceMetaInformation extends EntityMetaInformation implements Sourc
|
||||
public function __construct(\App\Entity\EntityInterface $entity)
|
||||
{
|
||||
if (!$entity instanceof AbstractSource) {
|
||||
throw new \TypeError('Entity has to be an instance of '.AbstractSource::class);
|
||||
throw new NotCorrectInstanceException('Entity has to be an instance of '.AbstractSource::class);
|
||||
}
|
||||
parent::__construct($entity);
|
||||
}
|
||||
|
Reference in New Issue
Block a user