Redefine target function making it echo an arbitrary value.

@param mixed $value
@throws \Brain\Monkey\Expectation\Exception\InvalidArgumentForStub
493378
public function justEcho($value = null)
    {
        is_null($value) and $value = '';
        $fqn = ltrim($this->function_name->fullyQualifiedName(), '\\');

        $this->assertPrintable($value, 'provided to justEcho');

        \Patchwork\redefine($fqn, function () use ($value) {
            echo $value;
        });

        $this->assertRedefined($fqn);
    }
1191549
public function setValue($value)
    {
        $this->value = $value;
        $this->listeners->executeAll($this->value);
    }
728378
public function push($option, $value)
	{
		if ( ! is_string($option))
		{
			throw new \InvalidArgumentException('The option value must be a string type.');
		}
		
		$this->heap[$option][] = $value;
	}
556602
protected function fixInputDate($value)
    {
        // split
        list($year, $month, $day, $time) = $this->explodeDateString($value);

        if ((int)$year === 0 && (int)$month === 0 && (int)$day === 0) {
            return null;
        }
        // Validate date
        if (!checkdate($month, $day, $year)) {
            throw new InvalidArgumentException(
                "Invalid date: '$value'. Use " . self::ISO_DATE . " to prevent this error."
            );
        }

        // Convert to y-m-d
        return sprintf('%d-%02d-%02d%s', $year, $month, $day, $time);
    }
904386
public function set($key, $value)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException('Expected string as key');
        }

        if (!is_string($value)) {
            throw new \InvalidArgumentException('Expected string as value');
        }

        $queryString = 'REPLACE INTO ' . $this->name . ' VALUES (:key, :value);';
        $stmt = $this->db->prepare($queryString);
        $stmt->bindParam(':key', $key, \PDO::PARAM_STR);
        $stmt->bindParam(':value', $value, \PDO::PARAM_STR);
        $stmt->execute();
        $this->data[(string)$key] = $value;

        return $this->data[$key];
    }
540067
public function setDefaultValue($value)
    {
        if (!is_array($value)) {
            throw new \InvalidArgumentException($this->getPath().': the default value of an array node has to be an array.');
        }

        $this->defaultValue = $value;
    }
1067884
public function move($value)
    {
        // No need to update if $value is already current one
        if ($value === $this->current()) {
            return;
        }

        $index = $this->search($value);

        if (false === $index) {
            throw new \InvalidArgumentException(sprintf('"%s" value not found in JobGraph', $value));
        }

        return $this->seek($index);
    }
423761
protected function setValue($value)
    {
        if (is_string($value)) {
            $this->value = $value;
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($value). "' for argument 'value' given."
            );
        }

        return $this;
    }
757674
protected function validate($value)
	{
		if ($value < $this->minValue || $value > $this->maxValue)
		{
			throw new InvalidArgumentException('Value ' . $value . ' is out of bounds (' . $this->minValue . '..' . $this->maxValue . ')');
		}
	}
906731
public function setLastReplyIncoming($value)
    {
        if (!is_bool($value))
        {
            throw new InvalidArgumentException($value . " must be true or false.");
        }
        $this->lastReplyIncoming = (boolean)$value;
    }
148868
public function setValue( $value ) {
		$this->value = $this->cleanUpValue( $value );
		$this->input->setValue( $this->value );
		return $this;
	}
389761
public function setSubject($value)
    {
        if (trim($value) == null)
        {
            throw new InvalidArgumentException("Subject cannot be empty.");
        }
        $this->subject = trim($value);
    }
524538
public function boost($value)
    {
        if ($value < 0) {
            throw new InvalidArgumentException('Boost must not be negative.');
        }

        $this->boost = $this->processFloat($value);

        return $this;
    }
1139552
public function validate($value): void
    {
        if (!$this->type->accepts($value)) {
            throw new InvalidArgument((string) $this->name);
        }
    }
761320
public function offsetSet($offset, $value)
    {
        $offset = trim(strval($offset));

        if (!$this->getField($offset)->validate($value)) throw new \InvalidArgumentException($offset . ' validation failed.');
        if ($value !== parent::offsetGet($offset)) $this->modified = true;

        parent::offsetSet($offset, $value);
    }
102721
public function append($value)
    {
        if (!$value instanceof $this->currencyClass) {
            throw new \InvalidArgumentException(sprintf('$newval must be an instance of Currency, instance of "%s" given', get_class($value)));
        }

        parent::append($value);
    }
1077635
protected function setValue($value)
    {
        if (!is_int($value)) {
            throw InvalidTypeException::fromMessageAndPrototype("Value must be an integer", static::prototype());
        }
        $this->value = $value;
    }