コード例 #1
0
 public function replaceWithDollarBackReferences()
 {
     $quoter = Pattern::compile('([^=]+)=([^ >]+)([ >]*)');
     $this->assertEquals('<a href="http://example.com" title="Link">...</a>', $quoter->replaceWith('$1="$2"$3', '<a href=http://example.com title=Link>...</a>'));
 }
コード例 #2
0
ファイル: WebTestCase.class.php プロジェクト: johannes85/core
 /**
  * Assert a text is not present
  *
  * @param   text.regex.Pattern pattern
  * @param   string message
  * @throws  unittest.AssertionFailedError  
  */
 public function assertTextPatternNotPresent(Pattern $pattern, $message = 'matched')
 {
     $this->assertEquals(\text\regex\MatchResult::$EMPTY, $pattern->match($this->getDom()->documentElement->textContent), $message);
 }