LaravelPackages.net
Acme Inc.
Toggle sidebar
imanghafoori/laravel-makesure

A Laravel package to help you write expressive tests

2.871
21
v1.1.2
About imanghafoori/laravel-makesure

imanghafoori/laravel-makesure is a Laravel package for a laravel package to help you write expressive tests. It currently has 21 GitHub stars and 2.871 downloads on Packagist (latest version v1.1.2). Install it with composer require imanghafoori/laravel-makesure. Discover more Laravel packages by imanghafoori or browse all Laravel packages to compare alternatives.

Last updated

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

Star History Chart