Example #1
0
    public function testFind()
    {
        $response = array('HTTP/1.1 200 OK', 'Header: Value', 'Connection: close', 'Content-Type: application/xml;charset=UTF-8', '', '<?xml version="1.0"?>
		       <response xmlns="http://www.freshbooks.com/api/" status="ok">
		  	     <invoice>
		    	    <invoice_id>1</invoice_id>
		       	    <client_id>3</client_id>
		    	    <contacts>
		               <contact>
		               <contact_id>0</contact_id>
		        	   </contact>
		    	    </contacts>
				    ...
				    ...
				    ');
        $data = $response;
        $this->socket->returnRead = implode("\r\n", $data);
        $result = Invoices::find('all');
        $this->assertTrue($result, 'Query did not pull data.');
    }
 public function index()
 {
     $result = Invoices::find('all');
 }