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

Example: $strSubstitutor = new RecursiveStrSubstitutor(array('HOST' => '{{URL}}', 'URL' => 'website.foo')); $substituted = $strSubstitutor->replace('Connect with {{HOST}}'); Result: Connect with website.foo
public replace ( string $string ) : mixed
$string string
Результат mixed
 /**
  * @test
  */
 public function shouldReturnValueWhenInfinityLoopOccurs()
 {
     //given
     $strSubstitutor = new RecursiveStrSubstitutor(array('URL' => '{{HOST}}', 'HOST' => '{{URL}}'), null, 10);
     //when
     $substituted = $strSubstitutor->replace('Best website: {{URL}}');
     //then
     $this->assertEquals('Best website: {{URL}}', $substituted);
 }