mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Implemented tests for DimensionHelper
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Entity\Attribut;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -10,26 +11,27 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
class MembershipsAttributTest extends TestCase
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var MembershipsAttributInterface
|
||||
*/
|
||||
protected $memberships;
|
||||
|
||||
public function setUp():void{
|
||||
$this->memberships = new class implements MembershipsAttributInterface{
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->memberships = new class() implements MembershipsAttributInterface {
|
||||
use MembershipsAttribut;
|
||||
};
|
||||
}
|
||||
|
||||
public function testConstructor():void {
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->memberships->getMemberships();
|
||||
}
|
||||
|
||||
public function testAccessors():void {
|
||||
|
||||
public function testAccessors(): void
|
||||
{
|
||||
$membership = $this->createMock(MemberCollectionSourceInterface::class);
|
||||
$this->assertNull($this->memberships->setMemberships(new ArrayCollection([$membership])));
|
||||
$this->assertEquals($this->memberships->getMemberships()->get(0), $membership);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user