/** * @expectedException \Doctrine\CouchDB\HTTP\HTTPException */ public function testGetReplicationLogRaisesExceptionWhenPeerNotReachable() { $this->response->status = 500; $this->source->expects($this->once())->method('findDocument')->willThrowException(HTTPException::fromResponse(null, $this->response)); $task = new ReplicationTask(); $replication = new Replication($this->source, $this->target, $task); list($sourceLog, $targetLog) = $replication->getReplicationLog(); $this->assertEquals($targetLog, array("log" => "source_replication_log")); $this->assertEquals($sourceLog, null); }