Download the PHP package integratedexperts/behat-phpserver without Composer

On this page you can find all versions of the php package integratedexperts/behat-phpserver. 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 behat-phpserver

Yourproject logo

PHP and API server for Behat tests

[![GitHub Issues](https://img.shields.io/github/issues/drevops/behat-phpserver.svg)](https://github.com/drevops/behat-phpserver/issues) [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/drevops/behat-phpserver.svg)](https://github.com/drevops/behat-phpserver/pulls) [![Test PHP](https://github.com/drevops/behat-phpserver/actions/workflows/test-php.yml/badge.svg)](https://github.com/drevops/behat-phpserver/actions/workflows/test-php.yml) [![codecov](https://codecov.io/gh/drevops/behat-phpserver/branch/main/graph/badge.svg?token=KZCCZXN5C4)](https://codecov.io/gh/drevops/behat-phpserver) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/drevops/behat-phpserver) [![Total Downloads](https://poser.pugx.org/drevops/behat-phpserver/downloads)](https://packagist.org/packages/drevops/behat-phpserver) ![LICENSE](https://img.shields.io/github/license/drevops/behat-phpserver) ![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=renovatebot)

Features

Installation

composer require --dev drevops/behat-phpserver

Usage

PhpServerContext

Used to serve assets from a pre-defined document root.

ApiServerContext

Used to serve a pre-set API responses from a pre-defined document root.

API responses can be queued up in the API server server by sending PUT requests to /admin/responses as an array of the expected responses using following JSON format:

The ApiServerContext provides several step definitions to make it easier to work with the API server:

See this test feature for more examples.

Using File Responses

The apiWillRespondWithFile step definition allows you to respond with the contents of a file from one of the configured fixture paths. The context will automatically detect the appropriate content type based on the file extension:

Multiple fixture paths can be configured in the behat.yml file. The context will search for the file in each path in the order specified until it finds a match.

Resetting the API Server

The resetApi step definition allows you to clear all queued responses and request history in the API server. This is useful for ensuring a clean state between test steps, especially when multiple scenarios interact with the API server:

For more information on supported RESTful API endpoints, see the API server implementation.

Accessing the API server URL from your contexts

If you need to access the API server URL from your context to update the base URL of your API client, you can do so by using beforeScenario in your FeatureContext class:

Maintenance

Lint code

Run tests


This repository was created using the Scaffold project template


All versions of behat-phpserver with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
behat/behat Version ^3.17
guzzlehttp/guzzle Version ^7.9
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 integratedexperts/behat-phpserver contains the following files

Loading the files please wait ....