Ensure consistent permalink structure between tests

See https://core.trac.wordpress.org/ticket/27704
Look for non-hardcoded search string

See https://core.trac.wordpress.org/ticket/27704,
https://core.trac.wordpress.org/changeset/28960