예제 #1
0
 public function testCore()
 {
     $expectedUrl = "http://localhost:8180/solr/admin/cores?wt=json";
     $expectedTimeout = false;
     // set a mock transport
     $mockTransport = $this->getMockHttpTransportInterface();
     // setup expected call and response
     $mockTransport->expects($this->once())->method('performGetRequest')->with($this->equalTo($expectedUrl), $this->equalTo($expectedTimeout))->will($this->returnValue(Apache_Solr_HttpTransport_ResponseTest::get200Response()));
     // call system
     $fixture = new Apache_Solr_service();
     $fixture->setHttpTransport($mockTransport);
     $fixture->cores();
 }