Pantheon\Terminus\FeatureTests\FeatureContext::iShouldHaveNewBackup PHP Method

iShouldHaveNewBackup() public method

Checks for backups made since the test started running
public iShouldHaveNewBackup ( ) : [boolean]
return [boolean]
    public function iShouldHaveNewBackup()
    {
        $regex = "/\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}/";
        preg_match_all($regex, $this->output, $matches);
        foreach ($matches[0] as $date) {
            if ($this->start_time < strtotime($date)) {
                return true;
            }
        }
        throw new \Exception('No new backups were created.' . PHP_EOL);
    }