Unit testing Postgis version check

Refs #22334.