PHP code example of vgirol / jsonapi-assert-laravel
1. Go to this page and download the library: Download vgirol/jsonapi-assert-laravel 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/ */
vgirol / jsonapi-assert-laravel example snippets
VGirol\JsonApiAssert\Laravel\JsonApiAssertServiceProvider::class
/**
* @test
*/
public function my_first_test()
{
// Sends request and gets response
$response = $this->json('GET', 'endpoint');
// Checks the response (status code, headers) and the content
$response->assertJsonApiResponse404(
[
[
'status' => '404',
'title' => 'Not Found'
]
]
);
}