diff --git a/application/src/Entity/Source/Collection/AbstractCollectionSource.php b/application/src/Entity/Source/Collection/AbstractCollectionSource.php index 28a6e39..ac377fa 100644 --- a/application/src/Entity/Source/Collection/AbstractCollectionSource.php +++ b/application/src/Entity/Source/Collection/AbstractCollectionSource.php @@ -3,12 +3,14 @@ namespace App\Entity\Source\Collection; use App\Entity\Source\AbstractSource; +use App\Entity\Attribut\CollectionAttribut; /** * @todo Implement inhiering classes! * * @author kevinfrantz */ -class AbstractCollectionSource extends AbstractSource implements CollectionSourceInterface +abstract class AbstractCollectionSource extends AbstractSource implements CollectionSourceInterface { + use CollectionAttribut; } diff --git a/application/src/Entity/Source/Collection/CollectionSourceInterface.php b/application/src/Entity/Source/Collection/CollectionSourceInterface.php index 6c05555..00deb24 100644 --- a/application/src/Entity/Source/Collection/CollectionSourceInterface.php +++ b/application/src/Entity/Source/Collection/CollectionSourceInterface.php @@ -3,7 +3,8 @@ namespace App\Entity\Source\Collection; use App\Entity\Source\SourceInterface; +use App\Entity\Attribut\CollectionAttributInterface; -interface CollectionSourceInterface extends SourceInterface +interface CollectionSourceInterface extends SourceInterface, CollectionAttributInterface { } diff --git a/application/tests/Unit/Entity/Source/Collection/AbstractCollectionSourceTest.php b/application/tests/Unit/Entity/Source/Collection/AbstractCollectionSourceTest.php new file mode 100644 index 0000000..7876b98 --- /dev/null +++ b/application/tests/Unit/Entity/Source/Collection/AbstractCollectionSourceTest.php @@ -0,0 +1,27 @@ +collectionSource = new class() extends AbstractCollectionSource { + }; + } + + public function testConstruct(): void + { + $this->expectException(\TypeError::class); + $this->collectionSource->getCollection(); + } +}