GFCI's installed in a box without a ground will still work as designed for people protection but as pointed out the test button on a three prong GFCI Test will NOT work because that type tester connects a 5mA bleed resistor between Line and Ground.
GFCI's are designed so that Ground is not required for the built in Self-Test button ON the GFCI.
This is done by connecting the Test bleed resistor back to the input side of the CT.