crudAttribut = new class() implements CrudAttributInterface { use CrudAttribut; }; } public function testConstructor(): void { $this->expectException(\TypeError::class); $this->crudAttribut->getCrud(); } public function testAccessors(): void { foreach (CRUDType::getChoices() as $enum) { $this->assertNull($this->crudAttribut->setCrud($enum)); $this->assertEquals($enum, $this->crudAttribut->getCrud()); } $this->expectException(NoValidChoiceException::class); $this->crudAttribut->setCrud('NoneValidType'); } }