mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +01:00
Implemented collection attribut for abstract source collection and tests
This commit is contained in:
parent
cbb8bc702c
commit
b11b53884b
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Entity\Source\Collection;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Entity\Source\Collection\CollectionSourceInterface;
|
||||
use App\Entity\Source\Collection\AbstractCollectionSource;
|
||||
|
||||
class AbstractCollectionSourceTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CollectionSourceInterface
|
||||
*/
|
||||
public $collectionSource;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->collectionSource = new class() extends AbstractCollectionSource {
|
||||
};
|
||||
}
|
||||
|
||||
public function testConstruct(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->collectionSource->getCollection();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user