testShowAndDispose() {
    dialog = createTestDialog();
    expectAfterHide(dialog);
    mockCtrl.$replayAll();

    assertNotOpen('Dialog should not be open before show()', dialog);
    dialog.show();
    assertOpen('Dialog should be open after show()', dialog);
    dialog.dispose();
    assertNotOpen('Dialog should not be open after dispose()', dialog);

    mockCtrl.$verifyAll();  // Verifies AFTER_HIDE was dispatched.
  }
Tests that when you show and dispose a dialog (without hiding it first) the
flags indicating open are correct and the AFTER_HIDE event is dispatched
(and no errors happen).
@suppress {checkTypes} suppression added to enable type checking