public function testCommitMethod() { // Mock actions $this->connection->shouldReceive('commit')->once()->andReturn($this->response); // Test start here $request = new Request($this->connection); $response = $request->commit(); $this->assertInstanceOf('EndyJasmi\\Neo4j\\ResponseInterface', $response); }