Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit b3580a8

Browse files
committed
Changed the extension to rely on Behat 2.5 instead of 2.4
1 parent a44f95e commit b3580a8

File tree

4 files changed

+24
-18
lines changed

4 files changed

+24
-18
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Provides integration layer for the [Yii framework](http://www.yiiframework.com/)
99
* Additional `wunit` session (sets as default) for Mink (if MinkExtension is installed)
1010
for functional testing without Selenium through [wunit](http://www.yiiframework.com/extension/wunit)
1111

12-
between Behat 2.4+ and Yii.
12+
between Behat 2.5+ and Yii.
1313

1414
Behat configuration
1515
-------------------
1616

17-
``` yml
17+
```yml
1818
default:
1919
extensions:
2020
Behat\MinkExtension\Extension:
@@ -29,19 +29,18 @@ default:
2929
Installation
3030
------------
3131
32-
``` json
32+
```json
3333
{
34-
"requires": {
35-
"behat/mink": "1.4.*",
36-
"behat/mink-extension": "*",
37-
"behat/yii-extension": "*"
34+
"require-dev": {
35+
"behat/mink": "~1.5",
36+
"behat/mink-extension": "~1.3",
37+
"behat/yii-extension": "~1.0"
3838
}
3939
}
4040
```
4141

42-
``` bash
43-
curl http://getcomposer.org/installer | php
44-
php composer.phar install
42+
```bash
43+
$ composer update 'behat/mink' 'behat/mink-extension' 'behat/yii-extension'
4544
```
4645

4746
Copyright
@@ -53,4 +52,4 @@ Maintainers
5352
-----------
5453

5554
* Konstantin Kudryashov [everzet](http://github.com/everzet) [lead developer]
56-
* Other [awesome developers](https://github.com/Behat/MinkExtension/graphs/contributors)
55+
* Other [awesome developers](https://github.com/Behat/YiiExtension/graphs/contributors)

composer.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "behat-extension",
44
"description": "Yii framework extension for Behat",
55
"keywords": ["framework", "web", "bdd"],
6-
"homepage": "http://mink.behat.org",
6+
"homepage": "http://behat.org",
77
"license": "MIT",
88
"authors": [
99
{
@@ -14,10 +14,20 @@
1414

1515
"require": {
1616
"php": ">=5.3.2",
17-
"behat/behat": ">=2.4.1,<2.4.x-dev"
17+
"behat/behat": "~2.5"
18+
},
19+
20+
"suggest": {
21+
"behat/mink-wunit-driver": "to register the MinkWUnitDriver with MinkExtension"
1822
},
1923

2024
"autoload": {
2125
"psr-0": { "Behat\\YiiExtension": "src/" }
26+
},
27+
28+
"extra": {
29+
"branch-alias": {
30+
"dev-master": "1.0.x-dev"
31+
}
2232
}
2333
}

src/Behat/YiiExtension/Context/YiiAwareContextInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface YiiAwareContextInterface
2020
/**
2121
* Sets Yii web application instance.
2222
*
23-
* @param Yii $mink Yii session manager
23+
* @param \CWebApplication $yii Yii application
2424
*/
2525
function setYiiWebApplication(\CWebApplication $yii);
2626
}

src/Behat/YiiExtension/Extension.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ public function load(array $config, ContainerBuilder $container)
3737
$loader->load('yii.xml');
3838
$basePath = $container->getParameter('behat.paths.base');
3939

40-
// starting from Behat 2.4.1, we can check for activated extensions
41-
$extensions = $container->hasParameter('behat.extension.classes')
42-
? $container->getParameter('behat.extension.classes')
43-
: array();
40+
$extensions = $container->getParameter('behat.extension.classes');
4441

4542
if (!isset($config['framework_script'])) {
4643
throw new \InvalidArgumentException(

0 commit comments

Comments
 (0)