public function testDeletesReservation() { $referenceNumber = '123'; $updateScope = SeriesUpdateScope::FullSeries; $session = new FakeWebServiceUserSession(123); $facade = new ReservationDeleteRequestResponseFacade($referenceNumber, $updateScope); $presenter = $this->getMock('IReservationDeletePresenter'); $reservation = new TestReservation(); $this->presenterFactory->expects($this->once())->method('Delete')->with($this->equalTo($facade), $this->equalTo($session))->will($this->returnValue($presenter)); $presenter->expects($this->once())->method('BuildReservation')->will($this->returnValue($reservation)); $presenter->expects($this->once())->method('HandleReservation')->with($this->equalTo($reservation)); $result = $this->controller->Delete($session, $referenceNumber, $updateScope); $expectedResult = new ReservationControllerResult($facade->ReferenceNumber(), $facade->Errors()); $this->assertEquals($expectedResult, $result); }