PHPackages                             timitao/behatplaceholderextension - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. timitao/behatplaceholderextension

ActiveBehat-context[Testing &amp; Quality](/categories/testing)

timitao/behatplaceholderextension
=================================

v1.0.0(11y ago)011MITPHPPHP &gt;=5.4

Since Feb 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/timiTao/BehatPlaceholderExtension)[ Packagist](https://packagist.org/packages/timitao/behatplaceholderextension)[ RSS](/packages/timitao-behatplaceholderextension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

[![License](https://camo.githubusercontent.com/8619d766faf9a8bf122fad502e54f9fb1de1783d4a322e82986496d437f66bc6/68747470733a2f2f706f7365722e707567782e6f72672f74696d6974616f2f6265686174706c616365686f6c646572657874656e73696f6e2f6c6963656e73652e737667)](https://packagist.org/packages/timitao/behatplaceholderextension)[![Latest Stable Version](https://camo.githubusercontent.com/90593ba91bf3bdc39ad7fb7083a48a6b71cad7c590346a0a645200e5715001aa/68747470733a2f2f706f7365722e707567782e6f72672f74696d6974616f2f6265686174706c616365686f6c646572657874656e73696f6e2f762f737461626c652e737667)](https://packagist.org/packages/timitao/behatplaceholderextension)[![Latest Unstable Version](https://camo.githubusercontent.com/19c7c7c46c5c09fc76b6eccde59b966e11eaf6336c6e73ca31f4d0d4ac761ae7/68747470733a2f2f706f7365722e707567782e6f72672f74696d6974616f2f6265686174706c616365686f6c646572657874656e73696f6e2f762f756e737461626c652e737667)](https://packagist.org/packages/timitao/behatplaceholderextension)[![Total Downloads](https://camo.githubusercontent.com/cd44c7f6b9c7f547aba05873fe354692c6a86a27b903cb4ba6a2ce0ae5a6d097/68747470733a2f2f706f7365722e707567782e6f72672f74696d6974616f2f6265686174706c616365686f6c646572657874656e73696f6e2f646f776e6c6f6164732e737667)](https://packagist.org/packages/timitao/behatplaceholderextension)[![SensioLabsInsight](https://camo.githubusercontent.com/9145d2b7db71e0f2f4a6eea506b43dc99e2b6a1d455e828f3ecf242cc829c262/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f64366337306431322d636364622d346331332d613464362d6262653631313364353630312f6d696e692e706e67)](https://insight.sensiolabs.com/projects/d6c70d12-ccdb-4c13-a4d6-bbe6113d5601)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ce1da29e08faee3d004318426f8a87a782a18a0728b96ba6b24503b3c07d1f70/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74696d6974616f2f6265686174706c616365686f6c646572657874656e73696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/timitao/behatplaceholderextension/?branch=master)

BehatPlaceholderExtension
=========================

[](#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
--------------------

[](#installing-extension)

The easiest way to install is by using [Composer](https://getcomposer.org):

```
$> curl -sS https://getcomposer.org/installer | php
$> php composer.phar require timitao/behatplaceholderextension='1.0.*'
```

or composer.json

```
"require": {
    "timitao/behatplaceholderextension": "1.0.*"
},

```

Extending
---------

[](#extending)

If you need owc placeholder, only need to add this due extension using tag `placeholder.object_mapper.register` and implement [interface](https://github.com/timiTao/BehatPlaceholderExtension/blob/master/src/Behat/PlaceholderExtension/Mapper/ObjectMapperInterface.php#L12). Look for consts [example](https://github.com/timiTao/BehatPlaceholderExtension/blob/master/src/Behat/PlaceholderExtension/Mappers/ConstObjectMapper.php#L14)

Example
-------

[](#example)

PHP Consts

- `placeholder(NULL)` - at context arrive NULL
- `placeholder(TRUE)` - at context arrive TRUE

Configuration consts - given example

```
Behat\PlaceholderExtension\ServiceContainer\Extension:
    defaults:
      key1: value1
      key2: value2

```

- `placeholder(key1)` - at context arrive `value1`
- `placeholder(key2)` - at context arrive `value2`

Versioning
----------

[](#versioning)

This repository will follow [Semantic Versioning v2.0.0](http://semver.org/spec/v2.0.0.html).

Contributors
------------

[](#contributors)

- Tomasz Kunicki [TimiTao](http://github.com/timiTao) \[lead developer\]

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4108d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2f588f9271b5a4b2bccdbf3c387b1769db408a23f675d83885371b0dd4bde2b?d=identicon)[timiTao](/maintainers/timiTao)

---

Top Contributors

[![timiTao](https://avatars.githubusercontent.com/u/6087694?v=4)](https://github.com/timiTao "timiTao (3 commits)")

---

Tags

behatbehat-extensiontestguiBehatextension

### Embed Badge

![Health badge](/badges/timitao-behatplaceholderextension/health.svg)

```
[![Health](https://phpackages.com/badges/timitao-behatplaceholderextension/health.svg)](https://phpackages.com/packages/timitao-behatplaceholderextension)
```

###  Alternatives

[robertfausk/behat-panther-extension

Symfony Panther extension for Behat

341.7M87](/packages/robertfausk-behat-panther-extension)[laracasts/behat-laravel-extension

Laravel extension for Behat

2611.3M12](/packages/laracasts-behat-laravel-extension)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50359.8k2](/packages/leanphp-behat-code-coverage)[drupal/tqextension

Behat extension for testing Drupal sites

1134.4k](/packages/drupal-tqextension)[kielabokkie/jsonapi-behat-extension

Behat extension for testing JSON APIs

1516.5k](/packages/kielabokkie-jsonapi-behat-extension)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
