Download the PHP package phiremock/phiremock-codeception-extension without Composer

On this page you can find all versions of the php package phiremock/phiremock-codeception-extension. 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 phiremock-codeception-extension

phiremock-codeception-extension

Codeception extension and module to make working with Phiremock even easier. It allows to start a Phiremock server specifically for the acceptance tests to run or to connect to an already running Phiremock server.

Latest Stable Version Build Status Scrutinizer Code Quality Monthly Downloads

Installation

Composer:

This project is published in packagist, so you just need to add it as a dependency in your composer.json:

NOTE Phiremock uses a dev-master version of react/http to work. Because of this, until reactphp guys tag a new version you will need to set your project's minimum stability to dev.

How to use

Extension

The extension provides an easy way to start a Phiremock server with configured host, port, debug mode and logs path.

Configuration

In codeception.yml you will need to enable Phiremock extension and configure it in a proper way:

Note: Since Codeception version 2.2.7, extensions configuration can be added directly in the suite configuration file. That will avoid phiremock to be started for every suite.

Phiremock uses annotations internally. To be able to run the extension, the annotations autoloader must be activated. To do this, you must add the next lines in the bootstrap file where you include your composer autoloader:

Parameters

Module

The module allows you to connect to a Phiremock server and to interact with it in a semantic way through the codeception actor in your tests.

Configuration

You need to enable Phiremock module in your suite's configuration file:

Use

The module provides the following handy methods to communicate with Phiremock server:

expectARequestToRemoteServiceWithAResponse

Allows you to setup an expectation in Phiremock, specifying the expected request and the response the server should give for it:

haveACleanSetupInRemoteService

Cleans the server of all configured expectations, scenarios and requests history, and reloads expectation files.

dontExpectRequestsInRemoteService

Cleans all previously configured expectations and requests history.

haveCleanScenariosInRemoteService

Cleans the state of all scenarios (sets all of them to inital state).

seeRemoteServiceReceived

Allows you to verify that the server received a request a given amount of times. This request could or not be previously set up as an expectation.

didNotReceiveRequestsInRemoteService

Resets the requests counter for the verifier in Phiremock.

Use case

Yii2-Curl

Yii2-Curl uses phiremock-codeception-extension for functional testing. You can see the configuration for the extension and the module, as well as how Phiremock is configured in the tests.


All versions of phiremock-codeception-extension with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
phiremock/phiremock Version ^1.8
codeception/codeception Version ^2.2
symfony/process Version ^3.1|^2.7.15|^4.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 phiremock/phiremock-codeception-extension contains the following files

Loading the files please wait ....