According to http://drupal.org/node/265828, the method signature for assertPattern() is
assertPattern($pattern, $subject, $message= '%s', $group= 'Other')
but in CVS HEAD it is
assertPattern($pattern, $message = '%s', $group = 'Other')
i.e. it operates on $this->drupalGetContent() like assertText(), assertRaw() etc.

The same applies to assertNoPattern().

Comments

Noyz’s picture

Component: Developer Guide » Correction/Clarification

Changed the component to reflect the new component categorization. See http://drupal.org/node/301443

Noyz’s picture

Changed the component to reflect the new component categorization. See http://drupal.org/node/301443

dawehner’s picture

Status: Active » Needs review

yes this is definitve wrong documentation

can anyone review

  <tr>
    <td>
      < code><?php
$this->assertPattern($pattern,  $message= '%s', $group= 'Other')
?>< /code>
    </td>
    <td>
      Asserts that the current content matches the regular expression < code>$pattern< /code>.
    </td>
    <td>
      < code><?php
$this->assertPattern('|[Dd]rupal|', t('Make sure Drupal/drupal is awesome.'));
?>< /code>
    </td>
  </tr>

<tr>
    <td>
      < code><?php
$this->assertNoPattern($pattern, $message= '%s', $group= 'Other')
?>< /code>
    </td>
    <td>
      Asserts that the current content does not match the regular expression < code>$pattern< /code>.
    </td>
    <td>
      < code><?php
$this->assertNoPattern('|[Ee]vil|', t('Make sure Evil/evil is not awesome.'));
?>< /code>
    </td>
  </tr>

i had to add a space to the inner codes

MGParisi’s picture

Version: » 6.x-1.x-dev
Status: Needs review » Fixed

If you applied the post, and no one has commented or changed it then after 5 months, its a good sign that its correct.

Set to Fix

jhodgdon’s picture

Version: 6.x-1.x-dev »

The fix had not been applied, actually.

It is applied now. I verified that the issue was correct, and fixed it more or less as the person above suggested.

MGParisi’s picture

thanks :-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.