Skip to content
Snippets Groups Projects
Commit a06bba54 authored by efalcy's avatar efalcy
Browse files

dev #36620 : boite formation : add test on custom field

parent 6c2014ff
Branches
Tags
6 merge requests!1553Master,!1519Master,!1506Master,!1502Master,!1451Dev#36620 improve formation widget,!1447Dev#36620 improve formation widget
......@@ -390,6 +390,32 @@ class ZendAfi_View_Helper_Accueil_SortAndDisplayFormationsWidgetTest extends Zen
}
/** @test */
public function customFieldShouldBeDisplayed() {
$this->custom_field = $this->fixture('Class_CustomField',
['id' => 5,
'priority' => 3,
'label' => 'News',
'field_type' => Class_CustomField_Meta::TEXT_INPUT,
'model' => 'SessionFormation']);
Class_CustomField_Model::register(new Class_CustomField_ModelConfiguration('SessionFormation',
'Session',
['module' => 'admin',
'controller' => 'formation',
'action' => 'session_edit']));
Class_SessionFormation::find(6)->setCustomField('News', 'more news')->saveWithCustomFields();
$this->renderWidget(
['division' => 1,
'type_module' => 'FORMATIONS_WIDGET',
'preferences' => ['selected_formations' => '3-1-5',
'display_order' => 'creation',
'display_mode' =>'Block']]);
$this->assertXPathContentContains($this->_html, '//dd' , 'more news');
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment