Implemented tests for DimensionHelper

This commit is contained in:
Kevin Frantz
2018-11-01 22:34:26 +01:00
parent 0cd09258e7
commit fdeaa390d3
19 changed files with 187 additions and 104 deletions

View File

@@ -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());
}
}