public function testDeleteById() { $groupId = 6; $this->groupRegistry->expects($this->once())->method('retrieve')->with($groupId)->willReturn($this->groupModel); $this->groupModel->expects($this->once())->method('usesAsDefault')->willReturn(false); $this->groupModel->expects($this->once())->method('delete'); $this->groupRegistry->expects($this->once())->method('remove')->with($groupId); $this->assertTrue($this->model->deleteById($groupId)); }
/** * {@inheritdoc} */ public function deleteById($id) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'deleteById'); if (!$pluginInfo) { return parent::deleteById($id); } else { return $this->___callPlugins('deleteById', func_get_args(), $pluginInfo); } }