Unit tests for redirectIfForeignWiki method