mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +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;
|
||||
@@ -8,27 +9,27 @@ use App\Entity\Attribut\IdAttributInterface;
|
||||
class IdAttributTest extends TestCase
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var IdAttributInterface
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
public function setUp():void{
|
||||
$this->id = new class implements IdAttributInterface{
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->id = new class() implements IdAttributInterface {
|
||||
use IdAttribut;
|
||||
};
|
||||
}
|
||||
|
||||
public function testConstruct():void{
|
||||
|
||||
public function testConstruct(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->id->getId();
|
||||
}
|
||||
|
||||
public function testAccessors():void{
|
||||
|
||||
public function testAccessors(): void
|
||||
{
|
||||
$id = 1234;
|
||||
$this->assertNull($this->id->setId($id));
|
||||
$this->assertEquals($id, $this->id->getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user