/** * @magentoDbIsolation enabled */ public function testDelete() { $group = $this->groupFactory->create()->setId(null)->setCode('New Group')->setTaxClassId(3); $groupId = $this->groupRepository->save($group)->getId(); $newGroup = $this->groupRepository->getById($groupId); $this->assertTrue($this->groupRepository->delete($newGroup)); }