collection = new class() implements CollectionAttributInterface { use CollectionAttribut; }; } public function testConstructor(): void { $this->expectException(\TypeError::class); $this->collection->getCollection(); } public function testAccessors(): void { $collection = new ArrayCollection(); $this->assertNull($this->collection->setCollection($collection)); $this->assertEquals($collection, $this->collection->getCollection()); } }