Download the PHP package lark/resttest without Composer

On this page you can find all versions of the php package lark/resttest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package resttest

Lark RestTest

RestTest is a REST API test library for testing REST API endpoints.

Install

Setup a Test Directory

Create a test directory, for example ./tests/Rest and add a run tests file like ./tests/Rest/run.php:

Create a Test Class

A test class can be created the ./tests/Rest directory and must end in Test.php. Create a first test class like ./tests/Rest/UserTest.php:

Each test class method that is a test must have @test in the docblock, otherwise it will be ignored when running tests.

If a method depends on another method, or multiple methods, the @depends [METHODNAME] annotation in the method docblock should be used, like @depends create.

If a class depends on another class the @depends [CLASSNAME] annotation in the class docblock should be used, like @depends \Tests\Rest\UserTest.

All classes ending in Test.php will be considered tests. To exclude a class file ending in Test.php from tests use @ignore in the class docblock.

Cleanup Callable

A test method can return a callable that is used as a cleanup function and will be called after the test method has been called, example:

Comparing Response Body

Sometimes a response body array of objects can be randomly ordered, which can cause a test to fail when using RestTest::expectBodySame. For example:

To get around this problem the RestTest::expectBodySameSorted method can be used to auto sort the expected array of objects and the response body array of objects by a specific field (id by default).

Run Tests

To run the tests go to the tests directory where the run tests file is located like ./tests/Rest and execute the run file:


All versions of resttest with dependencies

PHP Build Version
Package Version
Requires lark/framework Version ^0.26.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lark/resttest contains the following files

Loading the files please wait ....