mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Corrected variable name in givenTheCurrentTimeIs to address error
This commit is contained in:
parent
7205b83615
commit
ad7957587e
@ -13,6 +13,7 @@ use Behat\Mink\Driver\GoutteDriver,
|
||||
Behat\Mink\Exception\UnsupportedDriverActionException,
|
||||
Behat\Mink\Exception\ElementNotFoundException;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use SilverStripe\BehatExtension\Context\SilverStripeAwareContextInterface;
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
@ -414,9 +415,9 @@ class SilverStripeContext extends MinkContext implements SilverStripeAwareContex
|
||||
* @Given /^the current time is "([^"]*)"$/
|
||||
*/
|
||||
public function givenTheCurrentTimeIs($time) {
|
||||
$newDatetime = \DateTime::createFromFormat('H:i:s', $date);
|
||||
$newDatetime = \DateTime::createFromFormat('H:i:s', $time);
|
||||
if(!$newDatetime) {
|
||||
throw new InvalidArgumentException(sprintf('Invalid date format: %s (requires "H:i:s")', $date));
|
||||
throw new InvalidArgumentException(sprintf('Invalid date format: %s (requires "H:i:s")', $time));
|
||||
}
|
||||
|
||||
$state = $this->testSessionEnvironment->getState();
|
||||
|
Loading…
Reference in New Issue
Block a user