PHP 클래스 unittest\Output

상속: use trait XPSPL\Singleton
파일 보기 프로젝트 열기: prggmr/xpspl 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$colors Color codes

보호된 프로퍼티들

프로퍼티 타입 설명
$_breakcount Line break count
$_maxdepth Max recursion depth.

공개 메소드들

메소드 설명
assertion ( $test, string $assertion, array | null $args, null | boolean $result ) : void Outputs an assertion result.
backtrace ( array $backtrace, $type = self::ERROR ) : void Outputs a readable backtrace, by default it just dumps it from a for.
get_assertion_call_line ( ) : array Returns the location an assertion was called.
send ( string $string, string $type = null, boolean $newline = true ) : void Sends a string to output.
send_linebreak ( $type = null ) : void Sends a line break to the output with a border.
unknown_assertion ( $signal, string $func, array $args, object $assertion ) : void Generates an error indicating an unknown assertion has been called.
use_short_vars ( string $str = null ) : boolean Returns if short vars are enabled or to use.
variable ( mixed $v, integer &$depth ) : string Generates PHP vars like printr, var_dump the output is limited by using shortvars and the maximum output length.

메소드 상세

assertion() 공개 메소드

Outputs an assertion result.
public assertion ( $test, string $assertion, array | null $args, null | boolean $result ) : void
$assertion string Name of the assertion
$args array | null Array of arguments used during test
$result null | boolean True-pass,False-fail,null-skipped
리턴 void

backtrace() 공개 메소드

The output generator is at fault for providing it simplified.
public backtrace ( array $backtrace, $type = self::ERROR ) : void
$backtrace array debug_print_backtrace()
리턴 void

get_assertion_call_line() 공개 메소드

Currently this just returns the node at index 3 a more advanced method for determaining the assertion call will need to be developed to account for changes in the flow.
public get_assertion_call_line ( ) : array
리턴 array

send() 공개 정적인 메소드

Sends a string to output.
public static send ( string $string, string $type = null, boolean $newline = true ) : void
$string string Message to output
$type string Type of message for color generation if used.
$newline boolean Output line after string.
리턴 void

send_linebreak() 공개 메소드

Sends a line break to the output with a border.
public send_linebreak ( $type = null ) : void
리턴 void

unknown_assertion() 공개 메소드

Generates an error indicating an unknown assertion has been called.
public unknown_assertion ( $signal, string $func, array $args, object $assertion ) : void
$func string Assertion function called
$args array Array of arguments passed to the assertion
$assertion object The assertion object used
리턴 void

use_short_vars() 공개 메소드

Returns if short vars are enabled or to use.
public use_short_vars ( string $str = null ) : boolean
$str string
리턴 boolean

variable() 공개 메소드

Recursion is not checked for.
public variable ( mixed $v, integer &$depth ) : string
$v mixed
$depth integer Current transvering depth.
리턴 string

프로퍼티 상세

$_breakcount 보호되어 있는 프로퍼티

Line break count
protected $_breakcount

$_maxdepth 보호되어 있는 프로퍼티

Max recursion depth.
protected $_maxdepth

$colors 공개적으로 정적으로 프로퍼티

Color codes
public static $colors