Looking to hire Laravel developers? Try LaraJobs

laravel-makesure maintained by imanghafoori

Description
A Laravel package to help you write expressive tests
Author
Last update
2023/12/12 19:38 (dev-master)
License
Downloads
2 747

Comments
comments powered by Disqus

Laravel MakeSure

Easier tests for laravel

StyleCI Build Status

This package tries to give you a more readable syntax to write

Installation


composer require imanghafoori/laravel-makesure --dev

Usage

You can use it like this :


  MakeSure::about($this)->
      ->sendingGetRequest('some-url')
      ->isRespondedWith()
      ->statusCode(402);

// Instead of writing this :

$this
    ->get('some-url')
    ->assertStatus(402);

You should start of with the MakeSure alias or the Imanghafoori\MakeSure\Facades\MakeSure Facade class like this:


MakeSure::about($this)->...

Note that for technical reasons you should always pass $this into the about method.

then you have access to all of these methods:


sendingPostRequest

sendingJsonPostRequest

sendingDeleteRequest

sendingJsonDeleteRequest

sendingPutRequest

sendingJsonPutRequest

sendingPatchRequest

sendingJsonPatchRequest

sendingGetRequest

sendingJsonGetRequest