Development

Changeset 8638

You must first sign up to be able to contribute.

Changeset 8638

Show
Ignore:
Timestamp:
04/27/08 15:20:06 (6 months ago)
Author:
fabien
Message:

fixed sfBrowser references sfTestBrowser functionality (closes #3416 - patch from Kris.Wallsmith)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/test/sfTestBrowser.class.php

    r8530 r8638  
    383383 
    384384    return $this; 
     385  } 
     386   
     387  /** 
     388   * Trigger a test failure if an uncaught exception is present. 
     389   *  
     390   * @return  boolean 
     391   */ 
     392  public function checkCurrentExceptionIsEmpty() 
     393  { 
     394    if (false === ($empty = parent::checkCurrentExceptionIsEmpty())) 
     395    { 
     396      $this->test()->fail(sprintf('last request threw an uncatched exception "%s: %s"', get_class($this->getCurrentException()), $this->getCurrentException()->getMessage())); 
     397    } 
     398     
     399    return $empty; 
    385400  } 
    386401 
  • branches/1.1/lib/util/sfBrowser.class.php

    r8533 r8638  
    459459  } 
    460460 
     461  /** 
     462   * Test for an uncaught exception. 
     463   *  
     464   * @return  boolean 
     465   */ 
    461466  public function checkCurrentExceptionIsEmpty() 
    462467  { 
    463     if (is_null($this->getCurrentException()) || $this->getCurrentException() instanceof sfError404Exception) 
    464     { 
    465       return; 
    466     } 
    467  
    468     $this->test->fail(sprintf('last request threw an uncatched exception "%s: %s"', get_class($this->getCurrentException()), $this->getCurrentException()->getMessage())); 
     468    return is_null($this->getCurrentException()) || $this->getCurrentException() instanceof sfError404Exception; 
    469469  } 
    470470