Ejemplo n.º 1
0
 public function testMultipleRegexChanges()
 {
     $obj = new _Search();
     $obj->setSearchTerms('A new hope')->setRegexWholeWords('whole_word')->setRegexPerfectMatch(false)->setRegexCaseInsensitive('sensitive');
     $this->string($obj->getRegex())->isEqualTo('~\\bA new hope\\b~u');
     $obj->setSearchTerms('Return of the jedi')->setRegexWholeWords('')->setRegexPerfectMatch(true)->setRegexCaseInsensitive('');
     $this->string($obj->getRegex())->isEqualTo('~^Return of the jedi$~iu');
 }