Skip to content
Browse files

Merge branch 'release/0.2.1'

  • Loading branch information...
2 parents 1d5c865 + 43e748b commit 7c1aef611771deba9b913dc4934327cdfe669663 @everzet everzet committed Apr 21, 2011
View
5 CHANGES.md
@@ -1,3 +1,8 @@
+0.2.1 / 2011-04-21
+==================
+
+ * Fixed some bundled step definitions
+
0.2.0 / 2011-04-21
==================
View
4 src/Behat/Mink/Integration/steps/i18n/ru.xliff
@@ -82,6 +82,10 @@
<source><![CDATA[/^(?:|I )should see "(?P<element>[^"]*)" element$/]]></source>
<target><![CDATA[/^(?:|Я )должен видеть элемент "(?P<element>[^"]*)"$/]]></target>
</trans-unit>
+ <trans-unit id="i-should-not-see-element">
+ <source><![CDATA[/^(?:|I )should not see "(?P<element>[^"]*)" element$/]]></source>
+ <target><![CDATA[/^(?:|Я )не должен видеть элемент "(?P<element>[^"]*)"$/]]></target>
+ </trans-unit>
<trans-unit id="the-element-should-link-to">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should link to (?P<href>.*)$/]]></source>
<target><![CDATA[/^элемент "(?P<element>[^"]*)" должен вести на страницу (?P<href>.*)$/]]></target>
View
8 src/Behat/Mink/Integration/steps/mink_steps.php
@@ -62,7 +62,7 @@
});
$steps->Then('/^(?:|I )should not see "(?P<text>[^"]*+)"$/', function($world, $text) {
- assertRegExp('/(?!'.preg_quote($text).')/', $world->getSession()->getPage()->getContent());
+ assertNotRegExp('/'.preg_quote($text).'/', $world->getSession()->getPage()->getContent());
});
$steps->Then('/^the "(?P<field>[^"]*)" field should contain "(?P<value>[^"]*)"$/', function($world, $field, $value) {
@@ -128,6 +128,12 @@
if (null === $node) {
throw new ElementNotFoundException('element', $element);
}
+
+ assertNotNull($node);
+});
+
+$steps->Then('/^(?:|I )should not see "(?P<element>[^"]*)" element$/', function($world, $element) {
+ assertNull($world->getSession()->getPage()->find('xpath', $element));
});
$steps->Then('/^the "(?P<element>[^"]*)" element should link to (?P<href>.*)$/', function($world, $element, $href) {

0 comments on commit 7c1aef6

Please sign in to comment.
Something went wrong with that request. Please try again.