src/Request/Adapter/CurlMock.php
protected function createContent($type)
    {
        if ($type == 'json') {
            $this->headers['content_type'] = 'application/json; charset=UTF-8';

            return json_encode(['url' => $this->ch, 'status' => 'ok']);
        } elseif ($type == 'xml') {
            $this->headers['content_type'] = 'text/xml; charset=UTF-8';

            return '<?xml version="1.0" encoding="UTF-8"?><result><url>'.$this->ch.'</url><status>ok</status></result>';
        }

        return 'ok';
    }
protected function createContent($type)
    {
        if ($type == 'json') {
            $this->headers['content_type'] = 'application/json; charset=UTF-8';

            return json_encode(['url' => $this->ch, 'status' => 'ok']);
        } elseif ($type == 'xml') {
            $this->headers['content_type'] = 'text/xml; charset=UTF-8';

            return '<?xml version="1.0" encoding="UTF-8"?><result><url>'.$this->ch.'</url><status>ok</status></result>';
        }

        return 'ok';
    }
protected function createContent ( $ type ) { if ( $ type == 'json' ) { $ this -> headers [ 'content_type' ] = 'application/json; charset=UTF-8' ; return json_encode ( [ 'url' => $ this -> ch , 'status' => 'ok' ] ) ; } elseif ( $ type == 'xml' ) { $ this -> headers [ 'content_type' ] = 'text/xml; charset=UTF-8' ; return '<?xml version="1.0" encoding="UTF-8"?><result><url>' . $ this -> ch . '</url><status>ok</status></result>' ; } return 'ok' ; }
Create sample content for response.

@param $type

@return string
Create sample content for response .