Merge pull request #72 from robocoder/fix-arguments

for consistency, fix these step arguments too
This commit is contained in:
Konstantin Kudryashov
2013-03-23 12:49:15 -07:00
2 changed files with 14 additions and 6 deletions

View File

@@ -215,7 +215,7 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
*/ */
public function assertUrlRegExp($pattern) public function assertUrlRegExp($pattern)
{ {
$this->assertSession()->addressMatches($pattern); $this->assertSession()->addressMatches($this->fixStepArgument($pattern));
} }
/** /**
@@ -365,6 +365,8 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
*/ */
public function assertFieldContains($field, $value) public function assertFieldContains($field, $value)
{ {
$field = $this->fixStepArgument($field);
$value = $this->fixStepArgument($value);
$this->assertSession()->fieldValueEquals($field, $value); $this->assertSession()->fieldValueEquals($field, $value);
} }
@@ -375,6 +377,8 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
*/ */
public function assertFieldNotContains($field, $value) public function assertFieldNotContains($field, $value)
{ {
$field = $this->fixStepArgument($field);
$value = $this->fixStepArgument($value);
$this->assertSession()->fieldValueNotEquals($field, $value); $this->assertSession()->fieldValueNotEquals($field, $value);
} }
@@ -386,7 +390,7 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
*/ */
public function assertCheckboxChecked($checkbox) public function assertCheckboxChecked($checkbox)
{ {
$this->assertSession()->checkboxChecked($checkbox); $this->assertSession()->checkboxChecked($this->fixStepArgument($checkbox));
} }
/** /**
@@ -398,7 +402,7 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
*/ */
public function assertCheckboxNotChecked($checkbox) public function assertCheckboxNotChecked($checkbox)
{ {
$this->assertSession()->checkboxNotChecked($checkbox); $this->assertSession()->checkboxNotChecked($this->fixStepArgument($checkbox));
} }
/** /**

View File

@@ -303,7 +303,7 @@ trait MinkDictionary
*/ */
public function assertUrlRegExp($pattern) public function assertUrlRegExp($pattern)
{ {
$this->assertSession()->addressMatches($pattern); $this->assertSession()->addressMatches($this->fixStepArgument($pattern));
} }
/** /**
@@ -453,6 +453,8 @@ trait MinkDictionary
*/ */
public function assertFieldContains($field, $value) public function assertFieldContains($field, $value)
{ {
$field = $this->fixStepArgument($field);
$value = $this->fixStepArgument($value);
$this->assertSession()->fieldValueEquals($field, $value); $this->assertSession()->fieldValueEquals($field, $value);
} }
@@ -463,6 +465,8 @@ trait MinkDictionary
*/ */
public function assertFieldNotContains($field, $value) public function assertFieldNotContains($field, $value)
{ {
$field = $this->fixStepArgument($field);
$value = $this->fixStepArgument($value);
$this->assertSession()->fieldValueNotEquals($field, $value); $this->assertSession()->fieldValueNotEquals($field, $value);
} }
@@ -474,7 +478,7 @@ trait MinkDictionary
*/ */
public function assertCheckboxChecked($checkbox) public function assertCheckboxChecked($checkbox)
{ {
$this->assertSession()->checkboxChecked($checkbox); $this->assertSession()->checkboxChecked($this->fixStepArgument($checkbox));
} }
/** /**
@@ -486,7 +490,7 @@ trait MinkDictionary
*/ */
public function assertCheckboxNotChecked($checkbox) public function assertCheckboxNotChecked($checkbox)
{ {
$this->assertSession()->checkboxNotChecked($checkbox); $this->assertSession()->checkboxNotChecked($this->fixStepArgument($checkbox));
} }
/** /**