Perforce Chronicle 2012.2/486814
API Documentation

Content_Test_EditorElementTest Class Reference

Test methods for the content editor form element. More...

List of all members.

Public Member Functions

 testExtraPlugins ()
 Verify extra plugin functionality.
 testInstantiation ()
 Test instantiation.

Detailed Description

Test methods for the content editor form element.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Member Function Documentation

Content_Test_EditorElementTest::testExtraPlugins ( )

Verify extra plugin functionality.

    {
        $element = new Content_Form_Element_Editor('test');
        $initialPlugins = array('test0', 'test1', 'test2', 'test3');

        $element->setExtraPlugins($initialPlugins);
        $plugins = $element->getExtraPlugins();
        $this->assertTrue($plugins == $initialPlugins);

        $element->removeExtraPlugin('doesNotExist');
        $plugins = $element->getExtraPlugins();
        $this->assertTrue($plugins == $initialPlugins);

        $element->addExtraPlugin('test0');
        $plugins = $element->getExtraPlugins();
        $this->assertTrue($plugins == $initialPlugins);

        $element->removeExtraPlugin('test2');
        $this->assertFalse($element->hasExtraPlugin('test2'));

        $element->clearExtraPlugins();
        $plugins = $element->getExtraPlugins();
        $this->assertTrue(empty($plugins) && is_array($plugins));

        $element->addExtraPlugin('test4');
        $this->assertTrue($element->hasExtraPlugin('test4'));
    }
Content_Test_EditorElementTest::testInstantiation ( )

Test instantiation.

    {
        $element = new Content_Form_Element_Editor('test');
        $this->assertTrue($element instanceof Content_Form_Element_Editor, 'Expected class');
    }

The documentation for this class was generated from the following file: