PHPackages                             justblackbird/codeception-config-module - 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. justblackbird/codeception-config-module

ActiveLibrary

justblackbird/codeception-config-module
=======================================

Loads params from config into codeception scenarios.

1.0.0(9y ago)5150.9k↓27.8%23MITPHPPHP &gt;=5.4.0 &lt;8.0

Since Nov 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/JustBlackBird/codeception-config-module)[ Packagist](https://packagist.org/packages/justblackbird/codeception-config-module)[ RSS](/packages/justblackbird-codeception-config-module/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (3)

Codeception Config Module
=========================

[](#codeception-config-module)

[![Build Status](https://camo.githubusercontent.com/9767b842a3585e203ad93bfd12987a11ad0a0ce5f4b35d3cb14ccc252ff4e2e2/68747470733a2f2f7472617669732d63692e6f72672f4a757374426c61636b426972642f636f646563657074696f6e2d636f6e6669672d6d6f64756c652e737667)](https://travis-ci.org/JustBlackBird/codeception-config-module)

> Loads params from Codeception config and pass them to test scenarios.

Installation
------------

[](#installation)

Add the package into your composer.json:

```
{
    "require-dev": {
        "codeception/codeception": "^2.2",
        "justblackbird/codeception-config-module": "^1.0"
    }
}
```

Update the dependencies to download the package:

```
php composer.phar update

```

Then enable module in your `acceptance.suite.yml` configuration and any configs you want to pass to test scenarios:

```
class_name: AcceptanceTester
modules:
    enabled:
        - Config:
            # You can use any configs in the list. There no limitations on
            # the parameters names.
            foo: 'Foo value'
            bar: 'Bar value'
            cookies_price: '$3.50'
        - PhpBrowser:
            url: 'https://example.com/'
        - \Helper\Acceptance
```

Also you need to rebuild your actor class:

```
php codecept.phar build

```

Usage
-----

[](#usage)

First you need to specify parameters you want to pass to test scenario in Codeception config. Assume we need to use `username` and `password` to test login process. The `acceptance.suite.yml` file might look like:

```
class_name: AcceptanceTester
modules:
    enabled:
        - Config:
            username: 'john_doe'
            password: 'foobarbaz123'
        - PhpBrowser:
            url: 'https://example.com/'
        - \Helper\Acceptance
```

After you've set params in the config file you can use them in an acceptance scenarios. Here is an example:

```
