def METHOD_NAME(self):
    # open calls create_widgets, which needs default_command
    self.dialog.default_command = None
    # Since text parameter of .open is not used in base class,
    # pass dummy 'text' instead of tk.Text().
    self.dialog.open('text')
    self.assertEqual(self.dialog.top.state(), 'normal')
    self.dialog.close()
    self.assertEqual(self.dialog.top.state(), 'withdrawn')
    self.dialog.open('text', searchphrase="hello")
    self.assertEqual(self.dialog.ent.get(), 'hello')
    self.dialog.close()