12 unresolved threads
12 unresolved threads
#3328489 Fixing phpcs issues.
Merge request reports
Activity
28 28 * Process callback. 29 29 */ 30 30 public static function process(&$element, FormStateInterface $form_state, &$complete_form) { 31 $value = !empty($element['#default_value']) ? $element['#default_value'] : ['interval' => NULL, 'period' => NULL]; 31 $value = !empty($element['#default_value']) ? $element['#default_value'] : [ 32 'interval' => NULL, 33 'period' => NULL, 34 ]; 143 143 /** 144 144 * {@inheritdoc} 145 145 */ 146 public function buildPHPString() { 146 public function buildPhpString() { 14 15 */ 15 16 class IntervalTest extends BrowserTestBase { 16 17 18 use StringTranslationTrait; changed this line in version 3 of the diff
74 81 'field_name' => 'foobar', 75 82 'new_storage_type' => 'interval', 76 83 ]; 77 $this->submitForm($edit, t('Save and continue')); 84 $this->submitForm($edit, $this->t('Save and continue')); changed this line in version 3 of the diff
75 82 'new_storage_type' => 'interval', 76 83 ]; 77 $this->submitForm($edit, t('Save and continue')); 84 $this->submitForm($edit, $this->t('Save and continue')); 78 85 $this->submitForm([ 79 86 'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED, 80 ], t('Save field settings')); 87 ], $this->t('Save field settings')); 81 88 82 $this->submitForm([], t('Save settings')); 83 $this->assertSession()->responseContains(t('Saved %name configuration', ['%name' => 'Foobar'])); 89 $this->submitForm([], $this->t('Save settings')); 90 $this->assertSession()->responseContains($this->t('Saved %name configuration', ['%name' => 'Foobar'])); 84 91 85 92 // Setup widget and formatters. 86 93 EntityFormDisplay::load('entity_test.entity_test.default') 119 126 'user_id[0][target_id]' => 'foo (' . $this->adminUser->id() . ')', 120 127 ]; 121 128 122 $this->submitForm($edit, t('Save')); 129 $this->submitForm($edit, $this->t('Save')); changed this line in version 3 of the diff
164 171 // Remove one child. 165 172 'field_foobar[2][interval]' => '', 166 173 ]; 167 $this->submitForm($edit, t('Save')); 174 $this->submitForm($edit, $this->t('Save')); changed this line in version 3 of the diff
18 18 * A field storage to use in this test class. 19 19 * 20 20 * @var \Drupal\field\Entity\FieldStorageConfig 21 * The configuration field storage. changed this line in version 3 of the diff
25 26 * The field used in this test class. 26 27 * 27 28 * @var \Drupal\field\Entity\FieldConfig 29 * The FieldConfig. changed this line in version 3 of the diff
63 67 */ 64 68 public function testValueChange() { 65 69 66 // Verify entity creation. 70 // Verify the entity creation. 67 71 $entity = EntityTest::create(); 68 72 $value = ['interval' => 30, 'period' => 'minute']; 69 73 $entity->field_interval = $value; 70 74 $entity->name->value = $this->randomMachineName(); 71 75 $this->entityValidateAndSave($entity); 72 76 73 // Verify initial field value 77 // Verify the initial field value. 74 78 $this->assertEquals($entity->field_interval->interval, $value['interval']); 5 5 * Defines an interval field. 6 6 * @copyright Copyright(c) 2011 Rowlands Group 7 7 * @license GPL v2+ http://www.fsf.org/licensing/licenses/gpl.html 8 * @author Lee Rowlands leerowlands at rowlandsgroup dot com changed this line in version 3 of the diff
Please register or sign in to reply