log() public static method

If it is run via a TestRunner and the test extends PHPUnit_Framework_TestCase, then this will inject the result into the test runner for display, if not, it will throw the notice to STDERR.
public static log ( string $message, integer | boolean $backtraceDepth = 2 )
$message string
$backtraceDepth integer | boolean
コード例 #1
0
ファイル: OutputTestCase.php プロジェクト: qube81/old-phpunit
 /**
  * @return mixed
  * @throws RuntimeException
  */
 protected function runTest()
 {
     PHPUnit_Util_DeprecatedFeature_Logger::log('The functionality of PHPUnit_Extensions_OutputTestCase has been ' . 'merged into PHPUnit_Framework_TestCase. Please update your test ' . 'by extending PHPUnit_Framework_TestCase instead of ' . 'PHPUnit_Extensions_OutputTestCase.');
     return parent::runTest();
 }
コード例 #2
0
 /**
  * Asserts that an attribute is of a given type.
  *
  * @param  string  $expected
  * @param  string  $attributeName
  * @param  mixed   $classOrObject
  * @param  string  $message
  * @since  Method available since Release 3.4.0
  * @deprecated
  */
 public static function assertAttributeNotType($expected, $attributeName, $classOrObject, $message = '')
 {
     PHPUnit_Util_DeprecatedFeature_Logger::log('assertAttributeNotType() will be removed in PHPUnit 3.6 and ' . 'should no longer be used. assertAttributeNotInternalType() should ' . 'be used for asserting internal types such as "integer" or ' . '"string" whereas assertAttributeNotInstanceOf() should be used ' . 'for asserting that an object is an instance of a specified class ' . 'or interface.');
     self::assertNotType($expected, self::readAttribute($classOrObject, $attributeName), $message);
 }