make it compatible with behat v3
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
default:
|
||||
suites:
|
||||
default:
|
||||
path: %paths.base%/features
|
||||
context: Behat\MinkExtension\Context\MinkContext
|
||||
extensions:
|
||||
Behat\MinkExtension\Extension:
|
||||
base_url: http://en.wikipedia.org/
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
"require": {
|
||||
"php": ">=5.3.2",
|
||||
"behat/behat": "~2.5.0",
|
||||
"behat/behat": "~3@dev",
|
||||
"behat/mink": ">=1.4.3,<1.6-dev",
|
||||
"symfony/config": "~2.2"
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Behat\MinkExtension\Context;
|
||||
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
|
||||
use Behat\Behat\Context\TranslatedContextInterface,
|
||||
use Behat\Behat\Context\TranslatableContextInterface,
|
||||
Behat\Behat\Event\ScenarioEvent;
|
||||
|
||||
/*
|
||||
@@ -21,7 +21,7 @@ use Behat\Behat\Context\TranslatedContextInterface,
|
||||
*
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*/
|
||||
class MinkContext extends RawMinkContext implements TranslatedContextInterface
|
||||
class MinkContext extends RawMinkContext implements TranslatableContextInterface
|
||||
{
|
||||
/**
|
||||
* Opens homepage.
|
||||
@@ -459,9 +459,9 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTranslationResources()
|
||||
public static function getTranslationResources()
|
||||
{
|
||||
return $this->getMinkTranslationResources();
|
||||
return self::getMinkTranslationResources();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -469,7 +469,7 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getMinkTranslationResources()
|
||||
public static function getMinkTranslationResources()
|
||||
{
|
||||
return glob(__DIR__.'/../../../../i18n/*.xliff');
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ trait MinkDictionary
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getMinkTranslationResources()
|
||||
public static function getMinkTranslationResources()
|
||||
{
|
||||
return glob(__DIR__.'/../../../../i18n/*.xliff');
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Behat\MinkExtension\Context;
|
||||
|
||||
use Behat\Behat\Context\BehatContext;
|
||||
use Behat\Behat\Context\ContextInterface;
|
||||
|
||||
use Behat\Mink\Mink,
|
||||
Behat\Mink\WebAssert,
|
||||
@@ -22,7 +22,7 @@ use Behat\Mink\Mink,
|
||||
*
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*/
|
||||
class RawMinkContext extends BehatContext implements MinkAwareInterface
|
||||
class RawMinkContext implements MinkAwareInterface, ContextInterface
|
||||
{
|
||||
private $mink;
|
||||
private $minkParameters;
|
||||
|
||||
@@ -427,4 +427,9 @@ class Extension implements ExtensionInterface
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return 'mink';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<service id="behat.mink.context.initializer" class="%behat.mink.context.initializer.class%">
|
||||
<argument type="service" id="behat.mink" />
|
||||
<argument>%behat.mink.parameters%</argument>
|
||||
<tag name="behat.context.initializer" />
|
||||
<tag name="context.initializer" />
|
||||
</service>
|
||||
|
||||
<service id="behat.mink.listener.sessions_listener" class="%behat.mink.listener.sessions_listener.class%">
|
||||
|
||||
Reference in New Issue
Block a user