class PHPUnit_Util_DeprecatedFeature

Class to hold the information about a deprecated feature that was used

@package PHPUnit @subpackage Framework @author Ralph Schindler <ralph.schindler@zend.com> @author Sebastian Bergmann <sebastian@phpunit.de> @copyright 2002-2010 Sebastian Bergmann <sebastian@phpunit.de> @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License @link http://www.phpunit.de/ @since Interface available since Release 3.5.7

Hierarchy

Expanded class hierarchy of PHPUnit_Util_DeprecatedFeature

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/DeprecatedFeature.php, line 59

View source
class PHPUnit_Util_DeprecatedFeature {

  /**
   * @var array
   */
  protected $traceInfo = array();

  /**
   * @var string
   */
  protected $message = NULL;

  /**
   * @param  string $message
   * @param  array  $traceInfo
   */
  public function __construct($message, array $traceInfo = array()) {
    $this->message = $message;
    $this->traceInfo = $traceInfo;
  }

  /**
   * Build a string representation of the deprecated feature that was raised
   *
   * @return string
   */
  public function __toString() {
    $string = '';
    if (isset($this->traceInfo['file'])) {
      $string .= $this->traceInfo['file'];
      if (isset($this->traceInfo['line'])) {
        $string .= ':' . $this->traceInfo['line'] . ' - ';
      }
    }
    $string .= $this->message;
    return $string;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHPUnit_Util_DeprecatedFeature::$message protected property
PHPUnit_Util_DeprecatedFeature::$traceInfo protected property
PHPUnit_Util_DeprecatedFeature::__construct public function
PHPUnit_Util_DeprecatedFeature::__toString public function Build a string representation of the deprecated feature that was raised