Skip to content

Commit 4ebd7ad

Browse files
committed
Use RawSymfonyContext to not no redefine steps
1 parent c4805ca commit 4ebd7ad

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/ScayTrase/Utils/SMSDeliveryBundle/Features/Context/FeatureContext.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
namespace ScayTrase\Utils\SMSDeliveryBundle\Features\Context;
1010

1111
use PHPUnit_Framework_Assert;
12-
use ScayTrase\Behat\Context\SymfonyContext;
12+
use ScayTrase\Behat\Context\RawSymfonyContext;
1313
use ScayTrase\Utils\SMSDeliveryBundle\DataCollector\MessageDeliveryDataCollector;
1414
use ScayTrase\Utils\SMSDeliveryBundle\Service\ShortMessageInterface;
1515

16-
class FeatureContext extends SymfonyContext
16+
class FeatureContext extends RawSymfonyContext
1717
{
1818
private $code = null;
1919

@@ -50,4 +50,17 @@ public function iFillInWithCodeFromSMS($field)
5050
$value = $this->fixStepArgument($this->code);
5151
$this->getSession()->getPage()->fillField($field, $value);
5252
}
53+
54+
/**
55+
* Returns fixed step argument (with \\" replaced back to ").
56+
*
57+
* @param string $argument
58+
*
59+
* @return string
60+
*/
61+
protected function fixStepArgument($argument)
62+
{
63+
return str_replace('\\"', '"', $argument);
64+
}
65+
5366
}

0 commit comments

Comments
 (0)