Projet

Général

Profil

Révision db2d93dd

Ajouté par Benjamin Luce il y a presque 9 ans

Update to 7.37

Voir les différences:

drupal7/modules/field/modules/field_sql_storage/field_sql_storage.test
355 355
    field_attach_insert('test_entity', $entity);
356 356

  
357 357
    // Add an index
358
    $field = array('field_name' => $field_name, 'indexes' => array('value' => array('value')));
358
    $field = array('field_name' => $field_name, 'indexes' => array('value' => array(array('value', 255))));
359 359
    field_update_field($field);
360 360
    foreach ($tables as $table) {
361 361
      $this->assertTrue(Database::getConnection()->schema()->indexExists($table, "{$field_name}_value"), format_string("Index on value created in %table", array('%table' => $table)));
362 362
    }
363 363

  
364 364
    // Add a different index, removing the existing custom one.
365
    $field = array('field_name' => $field_name, 'indexes' => array('value_format' => array('value', 'format')));
365
    $field = array('field_name' => $field_name, 'indexes' => array('value_format' => array(array('value', 127), array('format', 127))));
366 366
    field_update_field($field);
367 367
    foreach ($tables as $table) {
368 368
      $this->assertTrue(Database::getConnection()->schema()->indexExists($table, "{$field_name}_value_format"), format_string("Index on value_format created in %table", array('%table' => $table)));

Formats disponibles : Unified diff