PHPackages                             libresign/behat-builtin-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. libresign/behat-builtin-extension

ActiveLibrary[API Development](/categories/api)

libresign/behat-builtin-extension
=================================

Behat extension to run php built-in web server

v0.6.3(1y ago)357.0k↓28.3%1AGPL-3.0+PHP

Since Feb 21Pushed 1y ago2 watchersCompare

[ Source](https://github.com/LibreSign/behat-builtin-extension)[ Packagist](https://packagist.org/packages/libresign/behat-builtin-extension)[ RSS](/packages/libresign-behat-builtin-extension/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (1)

[![Behat](https://github.com/LibreSign/behat-builtin-extension/actions/workflows/behat.yml/badge.svg)](https://github.com/LibreSign/behat-builtin-extension/actions/workflows/behat.yml)

Extension to use built-in PHP server on Behat tests
===================================================

[](#extension-to-use-built-in-php-server-on-behat-tests)

Instalation
-----------

[](#instalation)

```
composer require libresign/behat-builtin-extension
vendor/bin/behat --init
```

Configuration
-------------

[](#configuration)

Add the extension to your `behat.yml`:

```
default:
  extensions:
    PhpBuiltin\Server:
      verbose: false
      rootDir: /var/www/html
      host: localhost
```

### Config values

[](#config-values)

configdefaultEnvironmentDescriptionverbosefalseBEHAT\_VERBOSEEnables/disables verbose moderootDir/var/www/htmlBEHAT\_ROOT\_DIRSpecifies http root dirhostlocalhostBEHAT\_HOSTHost domain or IPrunAsBEHAT\_RUN\_ASThe username to be used to run the built-in serverworkers0BEHAT\_WORKERSThe quantity of workers to use. More informations [here](https://www.php.net/manual/en/features.commandline.webserver.php) searching by `PHP_CLI_SERVER_WORKERS`You can also use `-v` option to enable verbose mode. Example

```
vendor/bin/behat -v
```

The verbose mode will show:

- The rootDir used
- The output of PHP Built-in server

Usage example
-------------

[](#usage-example)

```
