/** * Test add and remove item */ public function testAddRemoveItem() { $country = new Category(); $this->assertEquals(0, $country->getItems()->count()); $country->addItem(new Item()); $this->assertEquals(1, $country->getItems()->count()); $item = $country->getItems()->first(); $country->removeItem($item); $this->assertEquals(0, $country->getItems()->count()); }