“The good ended happily, and the bad unhappily. That is what Fiction means.”
Miss Prism reduces fiction to a deliberately simplistic moral formula, and the neat certainty is precisely what makes the line comic.
Source details
The Importance of Being Earnest, Act II; Miss Prism. Project Gutenberg #844 preserves the exact line in the complete Act II text. The Samuel French acting-text witness represented elsewhere on this source hub omits this Cecily / Miss Prism happy-ending exchange, so this record deliberately uses the complete-text witness rather than a guessed scan page.