Testing the localheaderandfooter behavior
=========================================

Basic Setup
-----------

Create ```child``` folder for tests::

    >>> portal = layer.get('app').plone
    >>> z2.login(portal['acl_users'], 'manager')

    >>> from plone.dexterity.fti import DexterityFTI

A Dexterity container with custom header and footer

    >>> fti = DexterityFTI('Dexterity Container with localheaderandfooter')
    >>> portal.portal_types._setObject('Dexterity Container with localheaderandfooter', fti)
    'Dexterity Container with localheaderandfooter'
    >>> fti.klass = 'plone.dexterity.content.Container'
    >>> fti.schema = 'collective.localheaderandfooter.testing.IMyDexterityContainer'
    >>> fti.behaviors = ('collective.localheaderandfooter.behavior.IHeaderAndFooter',)

    >>> childid = portal.invokeFactory('Dexterity Container with localheaderandfooter', 'child1')
    >>> child = portal['child1']

    >>> 'Custom header' in child()
    True

    >>> 'Custom footer' in child()
    True

A Dexterity container without custom header and footer

    >>> fti = DexterityFTI('Dexterity Container without localheaderandfooter')
    >>> portal.portal_types._setObject('Dexterity Container without localheaderandfooter', fti)
    'Dexterity Container without localheaderandfooter'
    >>> fti.klass = 'plone.dexterity.content.Container'
    >>> fti.schema = 'collective.localheaderandfooter.testing.IMyDexterityContainer'

    >>> childid = portal.invokeFactory('Dexterity Container without localheaderandfooter', 'child2')
    >>> child = portal['child2']

    >>> 'Custom header' in child()
    False

    >>> 'Custom footer' in child()
    False
