layerAttribut = new class() implements LayerAttributInterface { use LayerAttribut; }; } public function testConstruct(): void { $this->expectException(\TypeError::class); $this->layerAttribut->getLayer(); } public function testAccessors(): void { foreach (LayerType::getValues() as $enum) { $this->assertNull($this->layerAttribut->setLayer($enum)); $this->assertEquals($enum, $this->layerAttribut->getLayer()); } $this->expectException(InvalidChoiceTypeException::class); $this->layerAttribut->setLayer('NoneValidLayer'); } }