PHPackages                             vgirol/jsonapi-assert-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. vgirol/jsonapi-assert-laravel

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

vgirol/jsonapi-assert-laravel
=============================

This package provides a set of assertions to test documents using Laravel and the JSON:API specification.

v2.3.0(5y ago)0911MITPHPPHP ^7.3|^8.0

Since Jun 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/VGirol/JsonApi-Assert-Laravel)[ Packagist](https://packagist.org/packages/vgirol/jsonapi-assert-laravel)[ Docs](http://github.com/VGirol/JsonApi-Assert-Laravel)[ RSS](/packages/vgirol-jsonapi-assert-laravel/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (9)Versions (15)Used By (0)

JsonApi-Assert-Laravel
======================

[](#jsonapi-assert-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/187da867e829e9d90bc23031a8ecb6634b100f683661e6ee91a0ebd679c04965/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f564769726f6c2f4a736f6e4170692d4173736572742d4c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/VGirol/JsonApi-Assert-Laravel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/cacf33079277754ecb7787823f2cbe64c231378dc61c3a1a767dc88e80e556a9/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f564769726f6c2f4a736f6e4170692d4173736572742d4c61726176656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/VGirol/JsonApi-Assert-Laravel)[![Coverage Status](https://camo.githubusercontent.com/8f3b2eef9a82dcee56936792369946ea363e875a2d684e937ffdbf69fada570d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f564769726f6c2f4a736f6e4170692d4173736572742d4c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/VGirol/JsonApi-Assert-Laravel/code-structure)[![Quality Score](https://camo.githubusercontent.com/36c2c0551ecc4194dc261e3403662ea7026281f173594f9119b800a9b80669e9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f564769726f6c2f4a736f6e4170692d4173736572742d4c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/VGirol/JsonApi-Assert-Laravel)[![Infection MSI](https://camo.githubusercontent.com/611a8e73464c728aa6c8a361759d042d34bb40fa213571af0cd7db93fa69e656/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d253246564769726f6c2532464a736f6e4170692d4173736572742d4c61726176656c2532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/VGirol/JsonApi-Assert-Laravel/master)[![Total Downloads](https://camo.githubusercontent.com/39e1bec2ee7aea436639c595a397c824249fbc425d52ec3b56c27b777732b2c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f564769726f6c2f4a736f6e4170692d4173736572742d4c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/VGirol/JsonApi-Assert-Laravel)

This package adds a lot of methods to the [`Illuminate\Testing\TestResponse`](https://laravel.com/api/5.8/Illuminate/Foundation/Testing/TestResponse.html) class for testing APIs that implements the [JSON:API specification](https://jsonapi.org/).

Table of content
----------------

[](#table-of-content)

Technologies
------------

[](#technologies)

- PHP 7.3+
- PHPUnit 8.0+
- Laravel 7+
- JsonApi-Assert

Installation
------------

[](#installation)

To install through composer, simply put the following in your `composer.json` file:

```
{
    "require-dev": {
        "vgirol/jsonapi-assert-laravel": "dev-master"
    }
}
```

And then run `composer install` from the terminal.

### Quick Installation

[](#quick-installation)

Above installation can also be simplified by using the following command:

```
composer require vgirol/jsonapi-assert-laravel
```

### Registration

[](#registration)

The package will automatically register itself. If you're not using Package Discovery, add the Service Provider to your config/app.php file:

```
VGirol\JsonApiAssert\Laravel\JsonApiAssertServiceProvider::class
```

Usage
-----

[](#usage)

```
/**
 * @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'
            ]
        ]
    );
}
```

Documentation
-------------

[](#documentation)

The API documentation is available in XHTML format at the url .

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Girol Vincent](https://github.com/VGirol)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~51 days

Recently: every ~89 days

Total

14

Last Release

1912d ago

Major Versions

v0.0.1 → v1.1.02019-12-16

v1.2.1 → v2.0.02020-04-11

1.3.x-dev → v2.1.12020-11-18

PHP version history (4 changes)v0.0.1PHP ^7.2

v1.2.0PHP ^7.2|^7.3

v1.2.1PHP ^7.3

v2.3.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18059718?v=4)[VGirol](/maintainers/VGirol)[@VGirol](https://github.com/VGirol)

---

Top Contributors

[![VGirol](https://avatars.githubusercontent.com/u/18059718?v=4)](https://github.com/VGirol "VGirol (129 commits)")

---

Tags

laravelassertionsunit testvgirolJsonApi-Assert-Laravel

### Embed Badge

![Health badge](/badges/vgirol-jsonapi-assert-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/vgirol-jsonapi-assert-laravel/health.svg)](https://phpackages.com/packages/vgirol-jsonapi-assert-laravel)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k41.3M38.9k](/packages/orchestra-testbench)[hotmeteor/spectator

Testing helpers for your OpenAPI spec

3051.5M1](/packages/hotmeteor-spectator)[guanguans/laravel-soar

SQL optimizer and rewriter for laravel. - laravel 的 SQL 优化器和重写器。

2228.3k](/packages/guanguans-laravel-soar)[spurwork/spectator

Testing helpers for your OpenAPI spec

3041.5k](/packages/spurwork-spectator)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[mnabialek/laravel-quick-migrations

Run Laravel tests quicker

2211.0k](/packages/mnabialek-laravel-quick-migrations)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
