mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Refactored reciever
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tests\Unit\Entity\Meta;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Entity\Meta\Reciever;
|
||||
use App\Entity\Meta\RecieverInterface;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
||||
class RecieverTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var RecieverInterface
|
||||
*/
|
||||
public $reciever;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->reciever = new Reciever();
|
||||
}
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->assertInstanceOf(Collection::class, $this->reciever->getCollection());
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->reciever->getRight();
|
||||
}
|
||||
}
|
@@ -27,11 +27,16 @@ class RightTest extends TestCase
|
||||
|
||||
public function testConstructorGeneral(): void
|
||||
{
|
||||
$this->assertEquals($this->right, $this->right->getReciever()->getRight());
|
||||
$this->assertTrue($this->right->getGrant());
|
||||
$this->assertEquals(0, $this->right->getPriority());
|
||||
}
|
||||
|
||||
public function testConstructorReciever(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->right->getReciever();
|
||||
}
|
||||
|
||||
public function testConstructorLayer(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
|
Reference in New Issue
Block a user