PHP Класс PAGI\Node\MockedNode

Автор: Marcelo Gornstein ([email protected])
Наследование: extends Node
Показать файл Открыть проект

Открытые методы

Метод Описание
assertCancelled ( ) : MockedNode Assert that this node is in state cancel after run().
assertComplete ( ) : MockedNode Assert that this node is in state complete after run().
assertMaxInputAttemptsReached ( ) : MockedNode Assert that this node is in state of max input attempts reached after run().
assertSayDateTime ( $time, $format, integer $totalTimes ) : MockedNode Configures this node to expect the given datetime to be played n number of times with the given format.
assertSayDigits ( integer $digits, integer $totalTimes ) : MockedNode Configures this node to expect the given digits to be played n number of times.
assertSayNumber ( $number, integer $totalTimes ) : MockedNode Configures this node to expect the given number to be played n number of times.
assertSaySound ( string $filename, integer $totalTimes ) : MockedNode Configures this node to expect a given filename to be played n number of times.
doBeforeFailedInput ( Closure $callback ) : MockedNode Execute a callback before invoking the real callback for failed input.
doBeforeValidInput ( Closure $callback ) : MockedNode Execute a callback before invoking the real callback for valid input.
run ( ) (non-PHPdoc)
runWithInput ( string $digits ) : MockedNode Configure this node to mimic these digits as user input.

Защищенные методы

Метод Описание
assertSay ( string $what, integer $totalTimes, string[] $arguments = [] ) : MockedNode Generic method to expect prompt messages played.
beforeOnInputFailed ( ) (non-PHPdoc)
beforeOnValidInput ( ) (non-PHPdoc)
callClientMethods ( $methods, $stopWhen = null ) (non-PHPdoc)
recordDoneSay ( string $what, string[] $arguments = [] ) : void Records a played prompt message with its arguments.
sayInterruptable ( string $what, array $arguments ) : void Used to mimic the user input per prompt message.

Описание методов

assertCancelled() публичный Метод

Assert that this node is in state cancel after run().
public assertCancelled ( ) : MockedNode
Результат MockedNode

assertComplete() публичный Метод

Assert that this node is in state complete after run().
public assertComplete ( ) : MockedNode
Результат MockedNode

assertMaxInputAttemptsReached() публичный Метод

Assert that this node is in state of max input attempts reached after run().
public assertMaxInputAttemptsReached ( ) : MockedNode
Результат MockedNode

assertSay() защищенный Метод

Generic method to expect prompt messages played.
protected assertSay ( string $what, integer $totalTimes, string[] $arguments = [] ) : MockedNode
$what string The pagi method name to expect.
$totalTimes integer Total times to expect this call
$arguments string[] The arguments to assert.
Результат MockedNode

assertSayDateTime() публичный Метод

Configures this node to expect the given datetime to be played n number of times with the given format.
public assertSayDateTime ( $time, $format, integer $totalTimes ) : MockedNode
$totalTimes integer
Результат MockedNode

assertSayDigits() публичный Метод

Configures this node to expect the given digits to be played n number of times.
public assertSayDigits ( integer $digits, integer $totalTimes ) : MockedNode
$digits integer
$totalTimes integer
Результат MockedNode

assertSayNumber() публичный Метод

Configures this node to expect the given number to be played n number of times.
public assertSayNumber ( $number, integer $totalTimes ) : MockedNode
$totalTimes integer
Результат MockedNode

assertSaySound() публичный Метод

Configures this node to expect a given filename to be played n number of times.
public assertSaySound ( string $filename, integer $totalTimes ) : MockedNode
$filename string
$totalTimes integer
Результат MockedNode

beforeOnInputFailed() защищенный Метод

(non-PHPdoc)
protected beforeOnInputFailed ( )

beforeOnValidInput() защищенный Метод

(non-PHPdoc)
protected beforeOnValidInput ( )

callClientMethods() защищенный Метод

(non-PHPdoc)
protected callClientMethods ( $methods, $stopWhen = null )

doBeforeFailedInput() публичный Метод

Execute a callback before invoking the real callback for failed input.
public doBeforeFailedInput ( Closure $callback ) : MockedNode
$callback Closure
Результат MockedNode

doBeforeValidInput() публичный Метод

Execute a callback before invoking the real callback for valid input.
public doBeforeValidInput ( Closure $callback ) : MockedNode
$callback Closure
Результат MockedNode

recordDoneSay() защищенный Метод

Records a played prompt message with its arguments.
protected recordDoneSay ( string $what, string[] $arguments = [] ) : void
$what string The pagi method name called.
$arguments string[] The arguments used, without the interrupt digits.
Результат void

run() публичный Метод

(non-PHPdoc)
public run ( )

runWithInput() публичный Метод

Configure this node to mimic these digits as user input.
public runWithInput ( string $digits ) : MockedNode
$digits string
Результат MockedNode

sayInterruptable() защищенный Метод

Used to mimic the user input per prompt message.
protected sayInterruptable ( string $what, array $arguments ) : void
$what string
$arguments array
Результат void