示例#1
0
 /**
  * Test UserServiceContract::deleteUser(User $user).
  *
  * @return void
  */
 public function testDeleteUser()
 {
     $mockUser = $this->getMockUser();
     $mockRepository = $this->getMockUserRepository();
     $mockRepository->shouldReceive('delete')->once()->with($mockUser)->andReturn(true);
     $service = new UserService($mockRepository);
     $result = $service->deleteUser($mockUser);
     $this->assertEquals($result, true, 'deleteUser(User $user) returned an invalid result');
 }