예제 #1
0
 public function testDelete()
 {
     $groupId = 6;
     $this->group->expects($this->once())->method('getId')->willReturn($groupId);
     $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->delete($this->group));
 }