Exemplo n.º 1
0
 /**
  * @covers \Packfire\Text\Regex\Regex::escape
  */
 public function testEscape()
 {
     $this->assertEquals('\\[a\\-z\\]\\{3\\}\\[0\\-9\\]\\{2\\}', Regex::escape('[a-z]{3}[0-9]{2}'));
     $this->assertEquals('\\/\\[a\\-z\\]\\{3\\}\\[0\\-9\\]\\{2\\}\\/', Regex::escape('/[a-z]{3}[0-9]{2}/', '/'));
 }