Permalink
Browse files

for consistency, fix these step arguments too

  • Loading branch information...
1 parent 07014c6 commit c911eef0193032d4ffacdc2747b6cc251a231de2 @robocoder robocoder committed Mar 22, 2013
View
10 src/Behat/MinkExtension/Context/MinkContext.php
@@ -215,7 +215,7 @@ public function assertHomepage()
*/
public function assertUrlRegExp($pattern)
{
- $this->assertSession()->addressMatches($pattern);
+ $this->assertSession()->addressMatches($this->fixStepArgument($pattern));
}
/**
@@ -365,6 +365,8 @@ public function assertElementNotOnPage($element)
*/
public function assertFieldContains($field, $value)
{
+ $field = $this->fixStepArgument($field);
+ $value = $this->fixStepArgument($value);
$this->assertSession()->fieldValueEquals($field, $value);
}
@@ -375,6 +377,8 @@ public function assertFieldContains($field, $value)
*/
public function assertFieldNotContains($field, $value)
{
+ $field = $this->fixStepArgument($field);
+ $value = $this->fixStepArgument($value);
$this->assertSession()->fieldValueNotEquals($field, $value);
}
@@ -386,7 +390,7 @@ public function assertFieldNotContains($field, $value)
*/
public function assertCheckboxChecked($checkbox)
{
- $this->assertSession()->checkboxChecked($checkbox);
+ $this->assertSession()->checkboxChecked($this->fixStepArgument($checkbox));
}
/**
@@ -398,7 +402,7 @@ public function assertCheckboxChecked($checkbox)
*/
public function assertCheckboxNotChecked($checkbox)
{
- $this->assertSession()->checkboxNotChecked($checkbox);
+ $this->assertSession()->checkboxNotChecked($this->fixStepArgument($checkbox));
}
/**
View
10 src/Behat/MinkExtension/Context/MinkDictionary.php
@@ -303,7 +303,7 @@ public function assertHomepage()
*/
public function assertUrlRegExp($pattern)
{
- $this->assertSession()->addressMatches($pattern);
+ $this->assertSession()->addressMatches($this->fixStepArgument($pattern));
}
/**
@@ -453,6 +453,8 @@ public function assertElementNotOnPage($element)
*/
public function assertFieldContains($field, $value)
{
+ $field = $this->fixStepArgument($field);
+ $value = $this->fixStepArgument($value);
$this->assertSession()->fieldValueEquals($field, $value);
}
@@ -463,6 +465,8 @@ public function assertFieldContains($field, $value)
*/
public function assertFieldNotContains($field, $value)
{
+ $field = $this->fixStepArgument($field);
+ $value = $this->fixStepArgument($value);
$this->assertSession()->fieldValueNotEquals($field, $value);
}
@@ -474,7 +478,7 @@ public function assertFieldNotContains($field, $value)
*/
public function assertCheckboxChecked($checkbox)
{
- $this->assertSession()->checkboxChecked($checkbox);
+ $this->assertSession()->checkboxChecked($this->fixStepArgument($checkbox));
}
/**
@@ -486,7 +490,7 @@ public function assertCheckboxChecked($checkbox)
*/
public function assertCheckboxNotChecked($checkbox)
{
- $this->assertSession()->checkboxNotChecked($checkbox);
+ $this->assertSession()->checkboxNotChecked($this->fixStepArgument($checkbox));
}
/**

0 comments on commit c911eef

Please sign in to comment.