Fixed wrong test. Value of the static property must not be changed to string.
Fixed test. It's not a problem to perform/continue replacing if the source "$search" string was modified by callback, because the source string is duplicate in this case.