Verifies whether the output of an iRun When is equal to the given.

@param PyStringNode $string

@Then /^I should get:$/

@throws \Exception if the condition is not fulfilled

@return void
507792
public function iShouldGet(PyStringNode $string)
    {
        if ($this->getOutput() != trim($string->getRaw())) {
            throw new \Exception(
                "Actual output is:\n" . $this->getOutput()
            );
        }
    }
1076372
public static function is_xml($string) {
        if (!defined('LIBXML_COMPACT')) {
            throw new \Exception('libxml is required to use Str::is_xml()');
        }

        $internal_errors = libxml_use_internal_errors();
        libxml_use_internal_errors(true);
        $result = simplexml_load_string($string) !== false;
        libxml_use_internal_errors($internal_errors);

        return $result;
    }
243908
public static function isPair($string)
    {
        $pair = explode("\x20", $string);

        if (count($pair) == 2) {
            if (self::isIdentifier(self::toLowerTrim($pair[0])) && self::isIdentifier(self::toLowerTrim($pair[1]))) {
                return true;
            }
        }

        return false;
    }
676344
public function sendWith($method, $url, PyStringNode $string)
    {
        $this->request = $this->requestFactory->createRequest(
            $method,
            $this->prepareUrl($url),
            $this->headers,
            trim($string->getRaw())
        );

        $this->sendRequest();
    }
961535
protected function _write($string, $options = null)
    {
        $this->write($string, $options);
        $this->_counter++;

        if ($this->_counter % $this->_dotWidth === 0) {
            $counter = min($this->_counter, $this->_total);
            $percent = min(floor(($counter * 100) / $this->_total), 100) . '%';
            $this->write(str_pad($counter, strlen($this->_total) + 1, ' ', STR_PAD_LEFT));
            $this->write(' / ' . $this->_total);
            $this->write(' (' . str_pad($percent, 4, ' ', STR_PAD_LEFT) . ")\n");
        }
    }
449474
protected function validateString(string $string)
    {
        if (strlen($string) > self::MAX_LENGTH || !filter_var($string, FILTER_VALIDATE_IP)) {
            throw InvalidArgumentException::format(
                    'Cannot construct class %s: argument must be a valid ip address, \'%s\' given',
                    get_class($this), $string
            );
        }
    }
850684
public static function equals($knownString, $userInput)
    {
        if (!is_string($knownString)) {
            $knownString = (string)$knownString;
        }

        if (!is_string($userInput)) {
            $userInput = (string)$userInput;
        }

        if (function_exists('hash_equals')) {
            return hash_equals($knownString, $userInput);
        }

        $knownLength = mb_strlen($knownString);

        if (mb_strlen($userInput) !== $knownLength) {
            return false;
        }

        $result = 0;

        for ($i = 0; $i < $knownLength; ++$i) {
            $result |= (ord($knownString[$i]) ^ ord($userInput[$i]));
        }

        return 0 === $result;
    }
972871
protected function textEndsWith($string, $ends_with)
    {
        $ends_with = trim($ends_with);
        if ($ends_with === '') {
            return false;
        }

        return substr_compare($string, $ends_with, -strlen($ends_with), strlen($ends_with)) === 0;
    }
997698
private function progress($string, $flags) {
		static $counter = 0;
		static $symbols = ["\\","|","/","-"];

		$this->output .= $string;
		
		if (false !== strpos($string, "\n")) {
			++$counter;
		}

		return $flags & PHP_OUTPUT_HANDLER_FINAL
			? "   \r"
			: sprintf("  %s\r", $symbols[$counter % 4]);
	}
669359
public static function initializeByString($string) {
        $Object = json_decode($string);
        $result = self::checkStatus($Object->status);
        if ($result === true) {
            $Status = new self();
            $Status->setStatus($Object->status)
                ->setReceipt(Receipt::initializeByObject($Object->receipt));
            return $Status;
        } else {
            $Exception = new $result($string, $Object->status);
            throw $Exception;
        }
    }
725520
public function compareStart($string)
    {
        foreach ($this->tokens as $token) {
            if ($token->hasTokenBeenFound()) {
                continue;
            }
            $token->compareStart($string);
        }
    }
1096324
final public function hasOperator($string)
    {
        $string = trim($string);
        //echo $string;
        $matches = array();
        if (!preg_match("/(\<|>|!|=|is null|BETWEEN|is not null)/i", $string, $matches)) {
            return FALSE;
        }
        return TRUE;
    }
547220
public function enterNode(Node $node)
    {
        if ($this->atLeastPhp55) {
            return;
        }

        if (!$node instanceof Empty_) {
            return;
        }

        if (!$node->expr instanceof Variable) {
            $msg = \sprintf('syntax error, unexpected %s', $this->getUnexpectedThing($node->expr));

            throw new ParseErrorException($msg, $node->expr->getLine());
        }
    }
138649
public function detect($string, $inBlock = false)
    {
        $this->_detectMatch = false;
        if ($this->isOpen) {
            if (isset($string[2]) && $string[0] === ']' && $string[1] === ']' && $string[2] === ']') {
                $this->_recursionDepth--;
                if ($this->_recursionDepth === 0)
                    $this->isOpen = false;
            } else if (isset($string[2]) && $string[0] === '[' && $string[1] === '[' && $string[2] === ']')
                $this->_recursionDepth++;
            if ($this->isOpen)
                $this->_currentContent .= $string . "\n";
            return true;
        }
        if (isset($string[2]) && $string[0] === '[' && $string[1] === '[' && $string[2] === '[') {
            if ($this->_recursionDepth === 0)
                $this->_programmingLanguage = trim(substr($string, 3));
            $this->_recursionDepth++;
            return true;
        }
        return false;
    }
435583
public static function isPoint($string)
    {
        if (gettype($string) === 'string') {
            $parts = explode("\x20", $string);
            if (count($parts) == 2) {
                if (self::isInteger($parts[0]) && self::isInteger($parts[1])) {
                    return true;
                }
            }
        }

        return false;
    }
289268
protected function parsePyString()
    {
        $token = $this->expectTokenType('PyStringOp');

        $line = $token['line'];

        $strings = array();
        while ('PyStringOp' !== ($predicted = $this->predictTokenType()) && 'Text' === $predicted) {
            $token = $this->expectTokenType('Text');

            $strings[] = $token['value'];
        }

        $this->expectTokenType('PyStringOp');

        return new PyStringNode($strings, $line);
    }
456489
public function insert(string $string) {
        $node = $this->root;
        for ($i = 0; $i < \strlen($string); $i++) {
            $charIndex = $this->getCharIndex($string[$i]);
            if (!$node->hasChild($charIndex)) {
                $node->createChildNode($charIndex);
            }
            $node = $node->getChildNode($charIndex);
        }
        $node->createEndOfWordNode();
    }