mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Implemented TypeAttributTest
This commit is contained in:
parent
a968052309
commit
41c8f7cfdd
38
application/tests/Unit/Entity/Attribut/TypeAttributTest.php
Normal file
38
application/tests/Unit/Entity/Attribut/TypeAttributTest.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Entity\Attribut;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Entity\Attribut\TypeAttributInterface;
|
||||
use App\Entity\Attribut\TypeAttribut;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class TypeAttributTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var TypeAttributInterface
|
||||
*/
|
||||
protected $typeAttribut;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->typeAttribut = new class() implements TypeAttributInterface {
|
||||
use TypeAttribut;
|
||||
};
|
||||
}
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->typeAttribut->getType();
|
||||
}
|
||||
|
||||
public function testAccessors(): void
|
||||
{
|
||||
$type = 'Hello World!';
|
||||
$this->assertNull($this->typeAttribut->setType($type));
|
||||
$this->assertEquals($type, $this->typeAttribut->getType());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user