public function testGetHide() { $note = Note::fromRow(['id' => 3, 'modified' => 123, 'title' => 'test', 'content' => 'yo']); $this->service->expects($this->once())->method('get')->with($this->equalTo(3), $this->equalTo($this->userId))->will($this->returnValue($note)); $response = $this->controller->get(3, 'title,content'); $this->assertEquals(json_encode(['modified' => 123, 'id' => 3]), json_encode($response->getData())); $this->assertTrue($response instanceof DataResponse); }