Download the PHP package anik/testbench-lumen without Composer

On this page you can find all versions of the php package anik/testbench-lumen. 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 testbench-lumen

testbench-lumen codecov

anik/testbench-lumen is a package, highly inspired by the orchestral/testbench. orchestral/testbench that is a tool for testing Laravel packages. Whereas the anik/testbench-lumen can only be used with Lumen, starting from Lumen 6.x and afterwards.

Installation

Documentation

NOTE: The package doesn't use the .env file. You'll have to primarily set all your variables in your phpunit.xml file.

Bootstrapping

The package internally boots the Lumen application for the test cases. While bootstrapping, you can add some functionalities.


The application does not by default loads the facade and eloquent. If you need to enable


To load your required service providers, you can return an array of providers from the serviceProviders() method. Default is [].


To add your middlewares, you can add both the global and route middlewares.


By default, the application has the access to the/ endpoint returning the app()->version() as the response. To define your routes for the test purpose, you can use the routes method. The method has access to the Laravel\Lumen\Routing\Router instance. Defining routes in this method is as same as writing methods in the routes/web.php or routes/api.php


If you don't want to report an Exception, you can use the dontReportExceptions method. The defined exceptions will not be reported. Default is [].


If it's required to work with the $app instance before the service providers are being registered, then beforeServiceProviders is the method to consider. It'll be called for each test methods.

Annotations

There are three types of annotations considered during the test run. All the annotated tasks are executed synchronously. All the tasks will receive the \Laravel\Lumen\Application\Application instance in their parameter.

See Annotation Test class to get the hang of it.


Examples

All the scenarios are covered with tests. You can use them as examples.


All versions of testbench-lumen with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
laravel/lumen Version ^6.0|^7.0|^8.0|^9.0|^10.0
phpunit/phpunit Version ^8.0|^9.0|^10.0
mockery/mockery Version ^1.3
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 anik/testbench-lumen contains the following files

Loading the files please wait ....