Development

Changeset 13343

You must first sign up to be able to contribute.

Changeset 13343

Show
Ignore:
Timestamp:
11/25/08 18:14:09 (7 months ago)
Author:
fabien
Message:

[1.2] changed the form tester to test error codes instead of error messages

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/test/sfTesterForm.class.php

    r13342 r13343  
    158158        if ($match[1] == '!') 
    159159        { 
    160           $this->tester->unlike($error->__toString(), substr($value, 1), sprintf('the submitted form has a "%s" error that does not match "%s".', $field, $value)); 
     160          $this->tester->unlike($error->getCode(), substr($value, 1), sprintf('the submitted form has a "%s" error that does not match "%s".', $field, $value)); 
    161161        } 
    162162        else 
    163163        { 
    164           $this->tester->like($error->__toString(), $value, sprintf('the submitted form has a "%s" error that matches "%s".', $field, $value)); 
     164          $this->tester->like($error->getCode(), $value, sprintf('the submitted form has a "%s" error that matches "%s".', $field, $value)); 
    165165        } 
    166166      } 
     
    174174      else 
    175175      { 
    176         $this->tester->is($error->__toString(), $value, sprintf('the submitted form has a "%s" error (%s).', $field, $value)); 
     176        $this->tester->is($error->getCode(), $value, sprintf('the submitted form has a "%s" error (%s).', $field, $value)); 
    177177      } 
    178178    } 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.