This tests ensuring link integrity when removing an referenced object
contained in a folder that is removed.  First we need to set up the necessary
links:

  >>> self.setRoles(('Manager',))
  >>> self.setText(portal.doc1, '<a href="folder1/doc3">a document</a>')
  >>> self.setText(portal.doc2, '<a href="folder1/doc3">a document</a>')

Then we try to delete the folder holding the referenced document.  Before we
can do this we need to prevent the test framework from choking on the
exception we intentionally throw (see docs/testRemovalTriggersConfirmation.txt
for more info):

  >>> self.setStatusCode('LinkIntegrityNotificationException', 200)
  >>> browser = self.getBrowser(loggedIn=True)
  >>> browser.open('http://nohost/plone/folder_contents')
  >>> browser.getControl('Test Folder 1').selected = True
  >>> browser.getControl('Delete').click()
  >>> browser.contents
  '...<form ... action="http://nohost/plone/removeConfirmationAction">...
   ...<a href="http://nohost/plone/folder1/doc3"...Test Page 3...
   ...This...Page...is referenced by the following items:...
   ...<li>...href="http://nohost/plone/doc1"...Test Page 1...</li>...
   ...<li>...href="http://nohost/plone/doc2"...Test Page 2...</li>...
   ...Would you like to delete it anyway?...'

After we have acknowledged the breach in link integrity the document should
have been deleted:

  >>> browser.getControl(name='delete').click()
  >>> portal.folder1.doc3
  Traceback (most recent call last):
  ...
  AttributeError: folder1

