Changeset 1721

Show
Ignore:
Timestamp:
05/16/08 02:01:47 (8 months ago)
Author:
ringmaster
Message:

Add setup and teardown methods to testing class.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/bootstrap.php

    r1361 r1721  
    5555        foreach($methods as $method) { 
    5656            $this->messages = array(); 
     57             
     58            if(method_exists($this, 'setup')) { 
     59                $this->setup(); 
     60            } 
    5761 
    5862            echo '<h2>' . $method . '</h2>'; 
     
    6266            foreach($this->messages as $message) { 
    6367                echo '<div><em>Fail:</em> ' . $message[0] . '<br/>' . $message[1][0]['file'] . ':' . $message[1][0]['line'] . '</div>'; 
     68            } 
     69 
     70            if(method_exists($this, 'teardown')) { 
     71                $this->teardown(); 
    6472            } 
    6573