Transforms url uids
-------------------

each urls like './resolveuid/abcdef' or 'http://localhost/plone/resolveUID/'
or 'http://localhost/plone/resolveuid/download'
must be transformed on page view by absolute url of each objects resolved uid.

Log in as manager

    >>> from plone.testing.z2 import Browser
    >>> from plone.app.testing import SITE_OWNER_NAME
    >>> from plone.app.testing import SITE_OWNER_PASSWORD
    >>> app = layer['app']
    >>> portal = layer['portal']
    >>> browser = Browser(app)
    >>> browser.open('http://nohost/plone/login_form')
    >>> browser.getControl('Login Name').value = SITE_OWNER_NAME
    >>> browser.getControl('Password').value = SITE_OWNER_PASSWORD
    >>> browser.getControl('Log in').click()

Create a document used to be linked
-----------------------------------

    >>> from Products.CMFPlone import utils as ploneutils
    >>> ploneutils._createObjectByType('Document', portal, 'abcd')
    <ATDocument at /plone/abcd>
    >>> import transaction
    >>> transaction.commit()

Get its uid

    >>> uid = portal['abcd'].UID()

Create a document with resolveuid urls
--------------------------------------

    >>> portal_url = portal.absolute_url()
    >>> browser.open('%s/createObject?type_name=Document' %portal_url)
    >>> browser.getControl(name='title').value = 'Test Doc'
    >>> html_text = '''
    ... <p><a href="./resolveuid/%s/view">Test</a></p>
    ... <p><a href="http://nohost/plone/resolveUid/%s#aaa">Test</a></p>
    ... ''' % (uid, uid)
    >>> browser.getControl(name='text').value = html_text
    >>> browser.getControl('Save').click()
    >>> 'Changes saved' in browser.contents
    True


Browse document
---------------
    >>> browser.open('http://nohost/plone/test-doc/view')
    >>> 'resolveuid' in browser.contents
    False
    >>> '<a href="http://nohost/plone/abcd/view">' in browser.contents
    True
    >>> '<a href="http://nohost/plone/abcd#aaa">' in browser.contents
    True
