functions.php
Table of Contents
- expect() : Assertion
- Creates a new assertion.
- fail() : void
- Fails a test with the given message.
- it() : void
- Provides the specification of a test block.
- skip() : void
- Skips a test block.
Functions
expect()
Creates a new assertion.
expect(mixed $target[, string $message = "" ]) : Assertion
Parameters
- $target : mixed
-
The target of the assertion.
- $message : string = ""
-
Message identifying the error generated by the assertion when it fails.
Return values
Assertion —The newly created assertion.
fail()
Fails a test with the given message.
fail([string $message = "" ]) : void
Parameters
- $message : string = ""
-
The message explaining the failure.
Return values
void —it()
Provides the specification of a test block.
it(string $specification, callable $block) : void
Parameters
- $specification : string
-
A message describing the test specification.
- $block : callable
-
The test block to be invoked.
Return values
void —skip()
Skips a test block.
skip(string $specification, callable $block[, bool $markTestAsSkipped = false ]) : void
Parameters
- $specification : string
-
A message describing the test specification.
- $block : callable
-
The test block to be invoked.
- $markTestAsSkipped : bool = false
-
Value indicating whether to mark the surrounding test as skipped.