/**
  * Tests to ensure that the widget editor is correctly being set on UsedWidgets
  */
 public function testUsedWidets()
 {
     $page = $this->objFromFixture('AdvancedWidgetEditorTest_FakePage', 'testpage');
     $form = new Form($page, 'TestForm', new FieldList($editor = new AdvancedWidgetAreaEditor('SideBar')), new FieldList());
     $form->loadDataFrom($page);
     $widget = $editor->UsedWidgets()->first();
     $this->assertEquals('Widget[SideBar][' . $widget->ID . ']', $widget->AdvancedName());
 }
 /**
  * Gets the name of the form
  * @return {string} Name of the form
  */
 public function getName()
 {
     return $this->_widgetEditor->getForm() ? $this->_widgetEditor->getForm()->getName() : null;
 }