fuzz-productions / rest-tester by Fuzzpro

A base test suite for RESTful APIs written with Laravel.
1,842
0
25
Package Data
Maintainer Username: Fuzzpro
Maintainer Contact: fuzzweb@fuzzproductions.com (Fuzz Productions)
Package Create Date: 2016-07-07
Package Last Update: 2016-12-09
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-22 03:06:41
Package Statistics
Total Downloads: 1,842
Monthly Downloads: 3
Daily Downloads: 0
Total Stars: 0
Total Watchers: 25
Total Forks: 0
Total Open Issues: 0

Laravel REST-tester Build Status

A suite of helper methods to test REST APIs.

Setup

  1. Require-dev the composer package
  2. Extend your base API test case from Fuzz\RestTests\BaseRestTestCase
  3. Adjust setUp and tearDown as needed. The tests for this package are a good example of how to use it.
    1. This package extends orchestra/testbench so all available functionality is present in rest-tester

Helper Traits

Base

  1. Fuzz\RestTests\BaseRestTestCase provides some helper methods to configure tests for a RESTful API

Resources

  1. Fuzz\RestTests\Resources\RestfulResource provides helper methods to test endpoints for restful resources
  2. Add Fuzz\RestTests\Resources\TestResourceX (where X is the resource action) traits depending on which actions need to be tested

OAuth

  1. Fuzz\RestTests\AuthTraits\OAuthTrait provides methods to authenticate, refresh tokens, retrieve tokens from request objects, create users/clients with scopes, etc.

Who tests the testers?

Run phpunit after composer install.