Merge branch '1.0'

This commit is contained in:
Daniel Hensby 2016-12-12 13:53:02 +00:00
commit 9fc5bf254b
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -10,6 +10,8 @@ use Behat\Mink\Driver\Selenium2Driver;
use Behat\Mink\Exception\UnsupportedDriverActionException;
use Behat\Mink\Exception\ElementNotFoundException;
use InvalidArgumentException;
use SilverStripe\BehatExtension\Context\SilverStripeAwareContextInterface;
use Symfony\Component\Yaml\Yaml;
// Mink etc.
require_once 'vendor/autoload.php';
@ -448,9 +450,9 @@ class SilverStripeContext extends MinkContext implements SilverStripeAwareContex
*/
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();