Projet

Général

Profil

Révision c9e51f47

Ajouté par Julien Enselme il y a environ 7 ans

Udpate to 7.54

Voir les différences:

drupal7/modules/field/modules/options/options.test
23 23
      'type' => 'list_integer',
24 24
      'cardinality' => 1,
25 25
      'settings' => array(
26
        // Make sure that 0 works as an option.
27
        'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',  3 => 'Some HTML encoded markup with &lt; &amp; &gt;'),
26
        'allowed_values' => array(
27
          // Make sure that 0 works as an option.
28
          0 => 'Zero',
29
          1 => 'One',
30
          // Make sure that option text is properly sanitized.
31
          2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
32
          // Make sure that HTML entities in option text are not double-encoded.
33
          3 => 'Some HTML encoded markup with &lt; &amp; &gt;',
34
        ),
28 35
      ),
29 36
    );
30 37
    $this->card_1 = field_create_field($this->card_1);
......
35 42
      'type' => 'list_integer',
36 43
      'cardinality' => 2,
37 44
      'settings' => array(
38
        // Make sure that 0 works as an option.
39
        'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>'),
45
        'allowed_values' => array(
46
          // Make sure that 0 works as an option.
47
          0 => 'Zero',
48
          1 => 'One',
49
          // Make sure that option text is properly sanitized.
50
          2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
51
        ),
40 52
      ),
41 53
    );
42 54
    $this->card_2 = field_create_field($this->card_2);
......
47 59
      'type' => 'list_boolean',
48 60
      'cardinality' => 1,
49 61
      'settings' => array(
50
        // Make sure that 0 works as a 'on' value'.
51
        'allowed_values' => array(1 => 'Zero', 0 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>'),
62
        'allowed_values' => array(
63
          // Make sure that 1 works as a 'on' value'.
64
          1 => 'Zero',
65
          // Make sure that option text is properly sanitized.
66
          0 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
67
        ),
52 68
      ),
53 69
    );
54 70
    $this->bool = field_create_field($this->bool);

Formats disponibles : Unified diff