str_replace: Match whole word only
You don't need the word boundary on the start of your string:
$str = preg_replace('/:Name\b/i', '"Test"', $str);
You don't need the word boundary on the start of your string:
$str = preg_replace('/:Name\b/i', '"Test"', $str);