timitao / behatplaceholderextension
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:behat-context
Requires
- php: >=5.4
- behat/behat: ~3.0.6,>=3.0.5
This package is auto-updated.
Last update: 2024-10-29 04:52:56 UTC
README
BehatPlaceholderExtension
Add functionality to replace some placeholders with special data. Default are added 2:
- PHP consts - NULL, TRUE, FALSE
- Configuration consts - defined at config file
Purpose of this is that usually i use in system non meaning const data, like default system admin. Addictionally extend placoholder from others extension. Over testing on local machine is okey, but when need run over some dump, user probably will change and i don't need to change scenarios.
Installing extension
The easiest way to install is by using Composer:
$> curl -sS https://getcomposer.org/installer | php $> php composer.phar require timitao/behatplaceholderextension='1.0.*'
or composer.json
"require": {
"timitao/behatplaceholderextension": "1.0.*"
},
Extending
If you need owc placeholder, only need to add this due extension using tag placeholder.object_mapper.register
and implement interface. Look for consts example
Example
PHP Consts
placeholder(NULL)
- at context arrive NULLplaceholder(TRUE)
- at context arrive TRUE
Configuration consts - given example
Behat\PlaceholderExtension\ServiceContainer\Extension:
defaults:
key1: value1
key2: value2
placeholder(key1)
- at context arrivevalue1
placeholder(key2)
- at context arrivevalue2
Versioning
This repository will follow Semantic Versioning v2.0.0.
Contributors
- Tomasz Kunicki TimiTao [lead developer]