Ntb\RestAPI\RestTest
Rest test class can work as base class for your functional tests. It provides some helpful methods to test your rest api more easily.
Synopsis
class RestTest
extends SapphireTest
{
- // members
- protected string $namespace = 'v/1';
- protected string $sessionRoute = 'sessions';
- // methods
- public void setUp()
- protected array makeApiRequest()
- protected array createSession()
Hierarchy
Extends
- SapphireTest
Members
protected
- $namespace
—
string
The namespace of your api. - $sessionRoute
—
string
The route to the session without the namespace.
Methods
protected
- createSession() — Creates a session for the api.
- makeApiRequest() — Perform an api request with the given options