Renamed TypeAttribut to CrudAttribut

This commit is contained in:
Kevin Frantz
2019-01-16 21:22:18 +01:00
parent 665f0044cc
commit 93bf246915
28 changed files with 113 additions and 107 deletions

View File

@@ -3,36 +3,36 @@
namespace Tests\Unit\Entity\Attribut;
use PHPUnit\Framework\TestCase;
use App\Entity\Attribut\TypeAttributInterface;
use App\Entity\Attribut\TypeAttribut;
use App\Entity\Attribut\CrudAttributInterface;
use App\Entity\Attribut\CrudAttribut;
/**
* @author kevinfrantz
*/
class TypeAttributTest extends TestCase
class CrudAttributTest extends TestCase
{
/**
* @var TypeAttributInterface
* @var CrudAttributInterface
*/
protected $typeAttribut;
public function setUp(): void
{
$this->typeAttribut = new class() implements TypeAttributInterface {
use TypeAttribut;
$this->typeAttribut = new class() implements CrudAttributInterface {
use CrudAttribut;
};
}
public function testConstructor(): void
{
$this->expectException(\TypeError::class);
$this->typeAttribut->getType();
$this->typeAttribut->getCrud();
}
public function testAccessors(): void
{
$type = 'Hello World!';
$this->assertNull($this->typeAttribut->setType($type));
$this->assertEquals($type, $this->typeAttribut->getType());
$this->assertNull($this->typeAttribut->setCrud($type));
$this->assertEquals($type, $this->typeAttribut->getCrud());
}
}