Example #1
0
 function testRead()
 {
     // Set up response for mock client
     $this->response->setBody('Text content');
     $this->response->setInfo(array('content_type' => 'text/text'));
     $this->mockClient->expects($this->any())->method('send')->will($this->returnValue($this->response));
     $doc = new MLPHP\Document($this->mockClient);
     $result = $doc->read($doc->getURI());
     $this->assertEquals($result, $doc->getContent());
     $this->assertEquals('text/text', $doc->getContentType());
 }