You should make sure error reporting is on (see your php.ini), and see if any error messages are being returned.
Is your "test.class" file in the same location as your "test2.php" file? If not, then you need to specify the folder where it exists.
Looks like the syntax is fine....