コード例 #1
0
 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));
 }
コード例 #2
0
 /**
  * {@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);
     }
 }