Created
September 10, 2021 07:33
-
-
Save npotier/0c9bfa330e877d45c4f8f5c4859288e5 to your computer and use it in GitHub Desktop.
Regex replace assertAttributeEquals by assertEquals in PHPUnit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Live example : https://regex101.com/r/vmdEN8/1