imanghafoori/laravel-makesure

A Laravel package to help you write expressive tests
3,011 21
Install
composer require imanghafoori/laravel-makesure
Latest Version:v1.1.2
PHP:>=7.0.0
Laravel:5 – 11
License:MIT
Last Updated:Dec 12, 2023
Links: GitHub  ·  Packagist
Maintainer: imanghafoori1

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

Related Packages

imanghafoori/laravel-nullable

A package to help you write expressive defensive code in a functional manner

556,921 151
inisiatif/distribution-financings

Share package for distribution financing

1,149 0
imanghafoori/laravel-smart-facades

Adds some features on the top of laravel facades

544,669 136
lastdragon-ru/lara-asp-core

The package contains useful utilities and classes.

149,031 0
lastdragon-ru/lara-asp-eloquent

Contains useful extensions and mixins for Eloquent.

138,141 1

Version History

Version Released PHP Laravel License
v1.1.2 >=7.0.0 ~5.1|6.*|7.*|8.*|9.*|10.*|11.* MIT
v1.1.1 >=7.0.0 ~5.1|6.*|7.*|8.* MIT
v1.1.0 >=7.0.0 ~5.1 MIT
v1.0.0 >=7.0.0 ~5.1 MIT