PHPackages                             weavora/mink-extra-context - 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. weavora/mink-extra-context

ActiveLibrary

weavora/mink-extra-context
==========================

Mink Extra Context

9138.3k↓30%6[8 issues](https://github.com/weavora/mink-extra-context/issues)2PHP

Since Jan 13Pushed 12y ago12 watchersCompare

[ Source](https://github.com/weavora/mink-extra-context)[ Packagist](https://packagist.org/packages/weavora/mink-extra-context)[ RSS](/packages/weavora-mink-extra-context/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (2)

Mink Extra Context
==================

[](#mink-extra-context)

Mink Extra Context provides additional contexts for behat/mink

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

[](#installation)

This extension requires:

- Behat 2.4+
- Mink 1.4+
- Mink extension

### Via Composer

[](#via-composer)

Step 1. Define dependencies in your `composer.json`:

```
{
    "require": {
        ...
        "weavora/mink-extra-context": "*"
    }
}
```

Step 2. Install/update your vendors:

```
    # install
    $ curl http://getcomposer.org/installer | php
    $ php composer.phar install

    # or update
    $ php composer.phar update
```

Step 3. Activate a mink extra context extension by specifying its class in your `behat.yml`:

```
    # behat.yml
    default:
        # ...
        extensions:
            # ...
            Weavora\MinkExtra\Extension:
                form: true
                table: true
                page: true
                page_area: true
```

Step 4. Add MinkExtraContext to your FeatureContent

```
class FeatureContext extends \Behat\MinkExtension\Context\MinkContext
{

    public function __construct(array $parameters)
    {
        // ...
        $this->useContext('mink-extra', new \Weavora\MinkExtra\Context\MinkExtraContext());
    }
}
```

Page Context
------------

[](#page-context)

The most common issue with a browser session is a situation when an element can't be found because the page haven't been loaded yet or ajax request is still being processed. Page context allows you to stop worrying about page loading time or ajax requests with no hooking features but tons of wait statements.

What page context performs is injecting special javascript page-wait conditions into every request related step (like click, go to and etc).

Form Context
------------

[](#form-context)

Filling in forms is often an annoying task. Form context helps you keep your form related features more structured.

Usage examples:

### Fill in forms

[](#fill-in-forms)

```
	Scenario: All form elements should be properly filled in

		Given I am on "/tests/pages/form.php"
		When I fill in the form with:
			| Text				| text value			|
			| Checkbox			| YES					|
			| Select			| Option 2				|
			| Multiple Select	| MOption 2, MOption 3	|
			| Radio 2			| YES					|
			| Textarea			| textarea value		|
			| Checkbox Group	| Checkbox 1,Checkbox 3	|

		Then the "Text" field should contain "text value"
		And the "Checkbox" checkbox should be checked
		And the "Select" field should contain "2"
		And the "Multiple Select" multiple field should contain "2,3"
		And the "Radio 2" checkbox should be checked
		And the "Textarea" field should contain "textarea value"
		And the "Checkbox 1" checkbox should be checked
		And the "Checkbox 3" checkbox should be checked
```

### Check forms

[](#check-forms)

```
	Scenario: All form elements should be properly asserted

		Given I am on "/tests/pages/form.php"
		When I fill in "Text" with "text value"
		And I check "Checkbox"
		And I select "Option 2" from "Select"
		And I select "MOption 1" from "Multiple Select"
		And I additionally select "MOption 2" from "Multiple Select"
		And I check "Radio 2"
		And I fill in "Textarea" with "textarea value"
		And I check "Checkbox 1"
		And I check "Checkbox 2"

		Then I should see the form with:
			| Text				| text value			|
			| Checkbox			| YES					|
			| Select			| Option 2				|
			| Multiple Select	| MOption 1,MOption 2	|
			| Radio 2			| YES					|
			| Textarea			| textarea value		|
			| Checkbox Group	| Checkbox 1,Checkbox 2	|
```

### Textareas

[](#textareas)

```
	Scenario: It should be possible to set a multiline value to textarea
		Given I am on "/tests/pages/form.php"

		When I fill in "Textarea" with:
		"""
		Line 1
		Line 2
		Line 3
		"""

		The "Textarea" field should contain:
		"""
		Line 1
		Line 2
		Line 3
		"""
```

### Multiple select value asserts

[](#multiple-select-value-asserts)

```
	Scenario: A select field with multiple attributes should be properly asserted

		Given I am on "/form.php"
		When I select "MOption 1" from "Multiple Select"
		And I additionally select "MOption 3" from "Multiple Select"
		The "Multiple Select" multiple field should contain "1,3"
```

### Notes

[](#notes)

1. The extension uses standard selectors to find fields. So you can use label selectors (like Title or Content) or name selectors (like post\_form\[title\] or post\_form\[content\])
2. The extension supports all field types like textarea, select, input,etc.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance2

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e4cb73f71ac4bbc3edef95155e8b8149e9a4cd2cf1db59cf11cb3010e0dba14?d=identicon)[haphan](/maintainers/haphan)

---

Top Contributors

[![yurytolochko](https://avatars.githubusercontent.com/u/440652?v=4)](https://github.com/yurytolochko "yurytolochko (13 commits)")[![Tinochkin](https://avatars.githubusercontent.com/u/6390624?v=4)](https://github.com/Tinochkin "Tinochkin (2 commits)")

### Embed Badge

![Health badge](/badges/weavora-mink-extra-context/health.svg)

```
[![Health](https://phpackages.com/badges/weavora-mink-extra-context/health.svg)](https://phpackages.com/packages/weavora-mink-extra-context)
```

PHPackages © 2026

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