All Projects → imanghafoori1 → laravel-makesure

imanghafoori1 / laravel-makesure

Licence: MIT License
Readable syntax to write tests in laravel

Programming Languages

PHP
23972 projects - #3 most used programming language

Laravel MakeSure

Easier tests for laravel

StyleCI Build Status Quality Score

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].