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