Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Convert assertion methods from SimpleTest to PHPUnit
# Usage: file1 file2 ...
perl -i -p \
-e 's/assertEquals?/assertEquals/g;' \
-e 's/assertNotEquals?/assertNotEquals/g;' \
-e 's/assertPattern/assertRegExp/g;' \
-e 's/assertIdentical/assertSame/g;' \
-e 's/assertNotIdentical/assertNotSame/g;' \
-e 's/assertNoPattern/assertNotRegExp/g;' \
-e 's/assertReference/assertSame/g;' \
-e 's/assertIsA\((\S+), *(\S+)\)/assertInstanceOf(\2, \1)/g;' \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.