layer = new class() implements LayerAttributInterface { use LayerAttribut; }; } public function testConstruct(): void { $this->expectException(\TypeError::class); $this->layer->getLayer(); } public function testAccessors(): void { foreach ([ LayerType::LAW, LayerType::RELATION, LayerType::SOURCE, ] as $value) { $this->assertNull($this->layer->setLayer($value)); $this->assertEquals($value, $this->layer->getLayer()); } } }