Perforce Chronicle 2012.2/486814
API Documentation
|
Test methods for the content editor form element. More...
Public Member Functions | |
testExtraPlugins () | |
Verify extra plugin functionality. | |
testInstantiation () | |
Test instantiation. |
Test methods for the content editor form element.
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'); }