Example #1
0
 /**
  * @dataProvider regexReplaceProvider()
  */
 public function testRegexReplace($expected, $str, $pattern, $replacement, $options = 'msr', $encoding = null)
 {
     $result = S::regexReplace($str, $pattern, $replacement, $options, $encoding);
     $this->assertInternalType('string', $result);
     $this->assertEquals($expected, $result);
 }
Example #2
0
 public function regexReplace($string, $pattern, $replacement, $options = 'msr')
 {
     return Stringy::regexReplace($string, $pattern, $replacement, $options);
 }