Download the PHP package jacekk/codeception-dataprovider-module without Composer
On this page you can find all versions of the php package jacekk/codeception-dataprovider-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jacekk/codeception-dataprovider-module
More information about jacekk/codeception-dataprovider-module
Files in jacekk/codeception-dataprovider-module
Package codeception-dataprovider-module
Short Description Easy data providers in your Codeception tests.
License MIT
Informations about the package codeception-dataprovider-module
Codeception DataProvider Module
This module helps to manage data (that you use inside tests) in an easy way. Especially, when you like Yaml/YML files format.
- Installation
- Parameters
- Usage examples
- License
Installation
Add the package into your composer.json file:
Tell Composer to download the package:
Then, enable it in your my-awesome.suite.yml
configuration and adjust two required params as in this library suite config:
You will need to rebuild your actor class:
or
or whatever your tool set allowes :) At last, check out the examples section and use it daily :)
Parameters
dataPathTpl
Template to build paths to files listed by appropriate setting. Allowes for the following tokens, where the first one is obviously required:
-
- one of elements listed in files setting,
-
- current working directory - PHP function:
getcwd()
.
- current working directory - PHP function:
files
One or more files names, which can be found under path defined in dataPathTpl.
If --env
param is used heavily, then some files reuse is sort of built in.
Usage examples
getValue($keyName, $default = null)
YML content:
PHP code:
iterateOver($keyName, callable $callback)
YML content:
or (this will also work, even it is not an ordered list):
PHP code:
See more examples in IterateOverCest which verify this module quality.
License
Released under the same licence as Codeception: MIT.