PHP code example of quillphp / testing

1. Go to this page and download the library: Download quillphp/testing 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/ */

    

quillphp / testing example snippets


use Quill\Testing\TestClient;

class UserTest extends \PHPUnit\Framework\TestCase {
    public function test_it_returns_user_data() {
        $app = new \Quill\App();
        // ... set up routes ...
        
        $client = new TestClient($app);
        
        $client->get('/users/1')
            ->assertStatus(200)
            ->assertJson(['id' => 1, 'name' => 'John']);
    }
}