replace() публичный Метод

Example:: String.replace("canal", "ana", "oo") == "cool" Note: this method does not perform regular expression matching, @see pregReplace().
public replace ( string $string, string $search, string $replace ) : string
$string string The input string
$search string A search string
$replace string A replacement string
Результат string The string with all occurrences replaced
 /**
  * @test
  * @dataProvider replaceExamples
  */
 public function replaceWorks($string, $search, $replace, $expected)
 {
     $helper = new StringHelper();
     $result = $helper->replace($string, $search, $replace);
     $this->assertSame($expected, $result);
 }