Skip to content

Instantly share code, notes, and snippets.

Created February 11, 2016 12:54
What would you like to do?
public function testStatusUpdate()
$client = $this->getMockBuilder('Cake\\Network\\Http\\Client')
->willReturn(new Response([
'HTTP/1.1 200 Ok'
], json_encode([
'id' => 1234,
'text' => 'Test123'
$query = new Query($this->webservice, new Endpoint());
'text' => 'Test123'
$resource = $this->webservice->execute($query);
$this->assertInstanceOf('Muffin\\Webservice\\Model\\Resource', $resource);
$this->assertEquals($resource->text, 'Test123');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment