Fix tests to be compatible with wordpress 4