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>')); }