Skip to content

Instantly share code, notes, and snippets.

@npotier
Created September 10, 2021 07:33
Show Gist options
  • Save npotier/0c9bfa330e877d45c4f8f5c4859288e5 to your computer and use it in GitHub Desktop.
Save npotier/0c9bfa330e877d45c4f8f5c4859288e5 to your computer and use it in GitHub Desktop.
Regex replace assertAttributeEquals by assertEquals in PHPUnit
This is a search replace instruction to replace deprectated assertAttributeEquals by assertEquals in PHPUnit code :
Search : \$this->assertAttributeEquals\(([$\[\]|a-zA-Z1-9 ,]+), '([a-zAZ])([a-zAZ]+)', ([$1-9a-zA-Z\->]+)\);
Replace : $this->assertEquals($1, $4->get\U$2$3());
@npotier
Copy link
Author

npotier commented Sep 10, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment