PHP code example of minicli / pest-plugin-curly

1. Go to this page and download the library: Download minicli/pest-plugin-curly library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

minicli / pest-plugin-curly example snippets




it('makes GET requests', function () {
    $this->get('https://api.github.com/rate_limit');
});

it('matches response codes', function () {
    $this->matchResponse('https://api.github.com/rate_limit', 200);
});

it('matches strings in response body', function () {
    $this->responseContains('https://api.github.com/rate_limit', 'rate');
});

use function Minicli\PestCurlyPlugin\curly;

it('makes requests using the curly() function to obtain response', function () {
    expect(curly()->get('https://api.github.com/rate_limit'))->toBeArray();
});