Skip to content
Snippets Groups Projects
Commit 49dd5408 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

rel #12996 : fix CI failures

parent 7741cdcd
Branches
Tags
3 merge requests!529Hotline 6.56,!418Dev#12996 formation ajout zone groupe utilisateur,!417Dev#12996 formation ajout zone groupe utilisateur
......@@ -48,8 +48,8 @@ class Class_CustomField_Meta extends Storm_Model_Abstract {
public function getFieldTypes() {
return
[Class_CustomField_Meta::TEXT_INPUT => $this->_('Texte'),
Class_CustomField_Meta::TEXT_AREA => $this->_('Zone de texte'),
Class_CustomField_Meta::CKEDITOR => $this->_('Zone de texte riche/HTML'),
Class_CustomField_Meta::TEXT_AREA => $this->_('Zone de texte simple'),
Class_CustomField_Meta::CKEDITOR => $this->_('Zone de texte HTML'),
Class_CustomField_Meta::SELECT => $this->_("Liste d'options")];
}
......
......@@ -16,12 +16,12 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_Form_Admin_CustomFields_CustomFieldMeta extends ZendAfi_Form_Admin_CustomFields {
public static function newWith($custom_field_meta_array) {
public static function newWith($custom_field_meta_array=[], $custom_form=null) {
$form = new self();
$form
->populate($custom_field_meta_array)
......
......@@ -16,19 +16,19 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
abstract class CustomFieldsMetaControllerTestCase extends AbstractControllerTestCase {
public function setUp() {
parent::setUp();
$this->fixture('Class_CustomField_Meta', [
'id' => 1,
'label' => 'Address',
'field_type' => Class_CustomField_Meta::TEXT_INPUT,
'options_list' => '']);
$this->fixture('Class_CustomField_Meta', [
'id' => 2,
'label' => 'Status',
......@@ -61,7 +61,7 @@ class CustomFieldsMetaControllerIndexActionTest extends CustomFieldsMetaControll
/** @test */
public function fieldTypeForAddressShouldBeChampTexte() {
$this->assertXPathContentContains('//table[@id="custom-fields-meta"]//td', 'Champ texte');
$this->assertXPathContentContains('//table[@id="custom-fields-meta"]//td', 'Texte');
}
......@@ -97,13 +97,13 @@ class CustomFieldsMetaControllerEditActionTest extends CustomFieldsMetaControlle
$this->dispatch('admin/custom-fields-meta/edit/id/1', true);
}
/** @test */
public function inputLabelShouldContainsAdress() {
$this->assertXPath('//input[@name="label"][@value="Address"]');
}
/** @test */
public function fieldTypeShouldBeText() {
$this->assertXPath('//select/option[@value="text"][@selected="selected"]');
......@@ -132,7 +132,7 @@ class CustomFieldsMetaControllerPostEditActionTest extends CustomFieldsMetaContr
public function setup() {
parent::setup();
$this->postDispatch('admin/custom-fields-meta/edit/id/1',
$this->postDispatch('admin/custom-fields-meta/edit/id/1',
['label' => 'public',
'field_type' => Class_CustomField_Meta::SELECT,
'options_list' => 'teens; parents ; all public ; ']);
......@@ -144,11 +144,11 @@ class CustomFieldsMetaControllerPostEditActionTest extends CustomFieldsMetaContr
$this->assertEquals('public', Class_CustomField_Meta::find(1)->getLabel());
}
/** @test */
public function fieldTypeShouldBeSelect() {
$this->assertEquals(
Class_CustomField_Meta::SELECT,
Class_CustomField_Meta::SELECT,
Class_CustomField_Meta::find(1)->getFieldType());
}
......@@ -156,7 +156,7 @@ class CustomFieldsMetaControllerPostEditActionTest extends CustomFieldsMetaContr
/** @test */
public function optionsListShouldBeTeensAndParents() {
$this->assertEquals(
['teens', 'parents', 'all public'],
['teens', 'parents', 'all public'],
Class_CustomField_Meta::find(1)->getOptionsListAsArray());
}
}
......
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