Development

#3416: sfBrowser.patch

You must first sign up to be able to contribute.

Ticket #3416: sfBrowser.patch

File sfBrowser.patch, 1.6 kB (added by Kris.Wallsmith, 9 months ago)
  • lib/test/sfTestBrowser.class.php

    old new  
    383383 
    384384    return $this; 
    385385  } 
     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; 
     400  } 
    386401 
    387402  /** 
    388403   * Tests if the given uri is cached. 
  • lib/util/sfBrowser.class.php

    old new  
    458458    $this->currentException = null; 
    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 
    471471  /**