~pressflow/pressflow/menu-tng

« back to all changes in this revision

Viewing changes to modules/simpletest/simpletest.test

  • Committer: David Strauss
  • Date: 2009-09-11 14:26:47 UTC
  • mfrom: (47.1.3 pressflow)
  • Revision ID: david@fourkitchens.com-20090911142647-266sj91beqp1nkmw
Update SimpleTest with boombatower's heroic backport and Josh's Pressflow integration work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    if (!$this->inCURL()) {
53
53
      $this->drupalGet('node');
54
54
      $this->assertTrue($this->drupalGetHeader('Date'), t('An HTTP header was received.'));
55
 
      $this->assertTitle(variable_get('site_name', 'Drupal'), t('Site title matches.'));
 
55
      $this->assertTitle(variable_get('site_name', 'Pressflow'), t('Site title matches.'));
56
56
      $this->assertNoTitle('Foo', t('Site title does not match.'));
57
57
      // Make sure that we are locked out of the installer when prefixing
58
58
      // using the user-agent header. This is an important security check.
59
59
      global $base_url;
60
60
 
61
61
      $this->drupalGet($base_url . '/install.php', array('external' => TRUE));
 
62
      $this->pass(print_r($this->drupalGetHeaders(TRUE), 1));
62
63
      $this->assertResponse(403, 'Cannot access install.php with a "simpletest" user-agent header.');
63
64
 
64
65
      $this->drupalLogin($this->drupalCreateUser());
206
207
   */
207
208
  function getTestResults() {
208
209
    $results = array();
209
 
 
210
210
    if ($this->parse()) {
211
211
      if ($fieldset = $this->getResultFieldSet()) {
212
212
        // Code assumes this is the only test in group.
213
213
        $results['summary'] = $this->asText($fieldset->div);
214
 
        $results['name'] = $this->asText($fieldset->fieldset->legend);
 
214
        $results['name'] = $this->asText($fieldset->legend);
215
215
 
216
216
        $results['assertions'] = array();
217
 
        $tbody = $fieldset->fieldset->table->tbody;
 
217
        $tbody = $fieldset->table->tbody;
218
218
        foreach ($tbody->tr as $row) {
219
219
          $assertion = array();
220
220
          $assertion['message'] = $this->asText($row->td[0]);
240
240
    $fieldsets = $this->xpath('//fieldset');
241
241
    $info = $this->getInfo();
242
242
    foreach ($fieldsets as $fieldset) {
243
 
      if ($fieldset->legend == $info['group']) {
 
243
      if ($fieldset->legend == $info['name']) {
244
244
        return $fieldset;
245
245
      }
246
246
    }