PHP 클래스 pho\Runner\Runner

파일 보기 프로젝트 열기: danielstjules/pho 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$console

보호된 프로퍼티들

프로퍼티 타입 설명
$instance

공개 메소드들

메소드 설명
after ( Closure $closure ) Constructs a new Hook, defining a closure to be ran after the parent suite's closure.
afterEach ( Closure $closure ) Constructs a new Hook, defining a closure to be ran prior to each of the parent suite's nested suites and specs.
before ( Closure $closure ) Constructs a new Hook, defining a closure to be ran prior to the parent suite's closure.
beforeEach ( Closure $closure ) Constructs a new Hook, defining a closure to be ran prior to each of the parent suite's nested suites and specs.
describe ( string $title, Closure $closure ) Constructs a test Suite, assigning it the given title and anonymous function. If it's a child of another suite, a reference to the parent suite is stored. This is done by tracking the current and previously defined suites.
getInstance ( ) : Runner Returns the singleton instance.
it ( string $title, Closure $closure = null ) Constructs a new Spec, adding it to the list of specs in the current suite.
run ( ) Starts the test runner by first invoking the associated reporter's beforeRun() method, then iterating over all defined suites and running their specs, and calling the reporter's afterRun() when complete.
watch ( ) Monitors the the current working directory for modifications, and reruns the specs in another process on change.
xdescribe ( string $title, Closure $closure ) Constructs a test Suite, assigning it the given title and anonymous function. If it's a child of another suite, a reference to the parent suite is stored. This is done by tracking the current and previously defined suites.
xit ( string $title, Closure $closure = null ) Constructs a new Spec, adding it to the list of specs in the current suite and mark it as pending.

비공개 메소드들

메소드 설명
runAfterEachHooks ( pho\Suite\Suite $suite ) Runs the afterEach hooks of the given suite and its parent suites recursively. They are ran in the order in the opposite order, from inner suites to outer suites.
runBeforeEachHooks ( pho\Suite\Suite $suite ) Runs the beforeEach hooks of the given suite and its parent suites recursively. They are ran in the order in which they were defined, from outer suite to inner suites.
runRunnable ( $runnable ) A short helper method that calls an object's run() method only if it's an instance of Runnable.
runSpecs ( pho\Suite\Suite $suite ) Runs the specs associated with the provided test suite. It iterates over and runs each spec, calling the reporter's beforeSpec and afterSpec methods, as well as the suite's beforeEach and aferEach hooks. If the filter option is used, only specs containing a pattern are ran. And if the stop flag is used, it quits when an exception or error is thrown.
runSuite ( pho\Suite\Suite $suite ) Runs a particular suite by running the associated hooks and reporter, methods, iterating over its child suites and recursively calling itself, followed by running its specs.

메소드 상세

after() 공개 메소드

Constructs a new Hook, defining a closure to be ran after the parent suite's closure.
public after ( Closure $closure )
$closure Closure The closure to be ran after the suite

afterEach() 공개 메소드

Constructs a new Hook, defining a closure to be ran prior to each of the parent suite's nested suites and specs.
public afterEach ( Closure $closure )
$closure Closure The closure to be ran after each spec

before() 공개 메소드

Constructs a new Hook, defining a closure to be ran prior to the parent suite's closure.
public before ( Closure $closure )
$closure Closure The closure to be ran before the suite

beforeEach() 공개 메소드

Constructs a new Hook, defining a closure to be ran prior to each of the parent suite's nested suites and specs.
public beforeEach ( Closure $closure )
$closure Closure The closure to be ran before each spec

describe() 공개 메소드

Constructs a test Suite, assigning it the given title and anonymous function. If it's a child of another suite, a reference to the parent suite is stored. This is done by tracking the current and previously defined suites.
public describe ( string $title, Closure $closure )
$title string A title to be associated with the suite
$closure Closure The closure to invoke when the suite is ran

getInstance() 공개 정적인 메소드

Returns the singleton instance.
public static getInstance ( ) : Runner
리턴 Runner The singleton instance

it() 공개 메소드

Constructs a new Spec, adding it to the list of specs in the current suite.
public it ( string $title, Closure $closure = null )
$title string A title to be associated with the spec
$closure Closure The closure to invoke when the spec is ran

run() 공개 메소드

Starts the test runner by first invoking the associated reporter's beforeRun() method, then iterating over all defined suites and running their specs, and calling the reporter's afterRun() when complete.
public run ( )

watch() 공개 메소드

Monitors the the current working directory for modifications, and reruns the specs in another process on change.
public watch ( )

xdescribe() 공개 메소드

After all, mark the Suit as pending.
public xdescribe ( string $title, Closure $closure )
$title string A title to be associated with the suite
$closure Closure The closure to invoke when the suite is ran

xit() 공개 메소드

Constructs a new Spec, adding it to the list of specs in the current suite and mark it as pending.
public xit ( string $title, Closure $closure = null )
$title string A title to be associated with the spec
$closure Closure The closure to invoke when the spec is ran

프로퍼티 상세

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

public static $console

$instance 보호되어 있는 정적으로 프로퍼티

protected static $instance