A GFCI is quite legal to use on an old two wire system like you would find in a 1950's house for example. You do have to label it that there is no ground. A GFCI simply looks at the current going out and the current coming in, and if they are not the same, it trips the breaker in it. The handheld plug in tester depends on having a connected and functioning ground, as it bleeds off some of the outgoing current to ground to create the fault, so, if the ground pin were not connected to anything (as in a typical residential two wire system, prior to todays three wire) then it would not trip the GFCI. I'm not sure how the tester in a GFCI receptacle creates a fault, I'm guessing they use the neutral, before the current sensing device (right at the incoming neutral terminal), it would give you the same effect as a fault to ground.
Charles