stub = $this->getMockBuilder(OptionsPropertyGroup::class)->onlyMethods([])->getMock(); } public function testAddProperty(): void { $propertyItem = new BoolPropertyItem(); $this->stub->addProperty($propertyItem); $this->stub->addProperty($propertyItem); self::assertTrue($this->stub->getProperties()->offsetExists($propertyItem)); self::assertCount(1, $this->stub->getProperties()); } public function testRemoveProperty(): void { $propertyItem = new BoolPropertyItem(); $this->stub->addProperty($propertyItem); self::assertTrue($this->stub->getProperties()->offsetExists($propertyItem)); $this->stub->removeProperty($propertyItem); self::assertFalse($this->stub->getProperties()->offsetExists($propertyItem)); } public function testGetProperties(): void { $propertyItem = new BoolPropertyItem(); $this->stub->addProperty($propertyItem); self::assertTrue($this->stub->getProperties()->offsetExists($propertyItem)); } }