~rpadovani/ubuntu-it-www/17Nov13

« back to all changes in this revision

Viewing changes to www/modules/simpletest/tests/tablesort.test

  • Committer: Riccardo Padovani
  • Date: 2013-11-17 21:00:52 UTC
  • Revision ID: rpadovani@ubuntu.com-20131117210052-ylmlqd3vqyl1nj29
Tags: Drupal 7.23
Update drupal core to version 7.23

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    );
59
59
    $ts = tablesort_init($headers);
60
60
    $this->verbose(strtr('$ts: <pre>!ts</pre>', array('!ts' => check_plain(var_export($ts, TRUE)))));
61
 
    $this->assertEqual($ts, $expected_ts, t('Simple table headers sorted correctly.'));
 
61
    $this->assertEqual($ts, $expected_ts, 'Simple table headers sorted correctly.');
62
62
 
63
63
    // Test with simple table headers plus $_GET parameters that should _not_
64
64
    // override the default.
71
71
    );
72
72
    $ts = tablesort_init($headers);
73
73
    $this->verbose(strtr('$ts: <pre>!ts</pre>', array('!ts' => check_plain(var_export($ts, TRUE)))));
74
 
    $this->assertEqual($ts, $expected_ts, t('Simple table headers plus non-overriding $_GET parameters sorted correctly.'));
 
74
    $this->assertEqual($ts, $expected_ts, 'Simple table headers plus non-overriding $_GET parameters sorted correctly.');
75
75
 
76
76
    // Test with simple table headers plus $_GET parameters that _should_
77
77
    // override the default.
87
87
    $expected_ts['query'] = array('alpha' => 'beta');
88
88
    $ts = tablesort_init($headers);
89
89
    $this->verbose(strtr('$ts: <pre>!ts</pre>', array('!ts' => check_plain(var_export($ts, TRUE)))));
90
 
    $this->assertEqual($ts, $expected_ts, t('Simple table headers plus $_GET parameters sorted correctly.'));
 
90
    $this->assertEqual($ts, $expected_ts, 'Simple table headers plus $_GET parameters sorted correctly.');
91
91
 
92
92
    // Test complex table headers.
93
93
 
118
118
      'query' => array(),
119
119
    );
120
120
    $this->verbose(strtr('$ts: <pre>!ts</pre>', array('!ts' => check_plain(var_export($ts, TRUE)))));
121
 
    $this->assertEqual($ts, $expected_ts, t('Complex table headers sorted correctly.'));
 
121
    $this->assertEqual($ts, $expected_ts, 'Complex table headers sorted correctly.');
122
122
 
123
123
    // Test complex table headers plus $_GET parameters that should _not_
124
124
    // override the default.
137
137
      'query' => array(),
138
138
    );
139
139
    $this->verbose(strtr('$ts: <pre>!ts</pre>', array('!ts' => check_plain(var_export($ts, TRUE)))));
140
 
    $this->assertEqual($ts, $expected_ts, t('Complex table headers plus non-overriding $_GET parameters sorted correctly.'));
 
140
    $this->assertEqual($ts, $expected_ts, 'Complex table headers plus non-overriding $_GET parameters sorted correctly.');
141
141
    unset($_GET['sort'], $_GET['order'], $_GET['alpha']);
142
142
 
143
143
    // Test complex table headers plus $_GET parameters that _should_
159
159
    );
160
160
    $ts = tablesort_init($headers);
161
161
    $this->verbose(strtr('$ts: <pre>!ts</pre>', array('!ts' => check_plain(var_export($ts, TRUE)))));
162
 
    $this->assertEqual($ts, $expected_ts, t('Complex table headers plus $_GET parameters sorted correctly.'));
 
162
    $this->assertEqual($ts, $expected_ts, 'Complex table headers plus $_GET parameters sorted correctly.');
163
163
    unset($_GET['sort'], $_GET['order'], $_GET['alpha']);
164
164
 
165
165
  }