Google\Cloud\Dev\Snippet\Parser\Snippet::replace PHP Method

replace() public method

Hopefully this is obvious, but be careful using this, and only use it when no other feasible options present themselves. It's pretty easy to make your test useless when you're modifying the thing you are trying to test. This is provided for cases when a snippet relies on a global, or on something else which can not be overridden or mocked.
public replace ( string $old, string $new ) : void
$old string The string to be replaced.
$new string The new string to insert.
return void
    public function replace($old, $new)
    {
        $this->config['content'] = str_replace($old, $new, $this->config['content']);
    }