BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
Prophecy\Prophecy\MethodProphecy Class Reference

Public Member Functions

 withArguments ($arguments)
 
 will ($promise)
 
 willReturn ()
 
 willReturnArgument ($index=0)
 
 willThrow ($exception)
 
 should ($prediction)
 
 shouldBeCalled ()
 
 shouldNotBeCalled ()
 
 shouldBeCalledTimes ($count)
 
 shouldHave ($prediction)
 
 shouldHaveBeenCalled ()
 
 shouldNotHaveBeenCalled ()
 
 shouldNotBeenCalled ()
 
 shouldHaveBeenCalledTimes ($count)
 
 checkPrediction ()
 
 getPromise ()
 
 getPrediction ()
 
 getCheckedPredictions ()
 
 getObjectProphecy ()
 
 getMethodName ()
 
 getArgumentsWildcard ()
 
 hasReturnVoid ()
 

Detailed Description

Method prophecy.

Author
Konstantin Kudryashov ever..nosp@m.zet@.nosp@m.gmail.nosp@m..com

Member Function Documentation

Prophecy\Prophecy\MethodProphecy::checkPrediction ( )

Checks currently registered [with should(...)] prediction.

Prophecy\Prophecy\MethodProphecy::getArgumentsWildcard ( )

Returns arguments wildcard.

Returns
Argument
Prophecy\Prophecy\MethodProphecy::getCheckedPredictions ( )

Returns predictions that were checked on this object.

Returns
Prediction[]
Prophecy\Prophecy\MethodProphecy::getMethodName ( )

Returns method name.

Returns
string
Prophecy\Prophecy\MethodProphecy::getObjectProphecy ( )

Returns object prophecy this method prophecy is tied to.

Returns
ObjectProphecy
Prophecy\Prophecy\MethodProphecy::getPrediction ( )

Returns currently registered prediction.

Returns
null|Prediction
Prophecy\Prophecy\MethodProphecy::getPromise ( )

Returns currently registered promise.

Returns
null|Promise
Prophecy\Prophecy\MethodProphecy::hasReturnVoid ( )
Returns
bool
Prophecy\Prophecy\MethodProphecy::should (   $prediction)

Sets custom prediction to the prophecy.

Parameters
callable | Prediction\PredictionInterface$prediction
Returns
$this
Exceptions
\Prophecy\Exception\InvalidArgumentException
Prophecy\Prophecy\MethodProphecy::shouldBeCalled ( )

Sets call prediction to the prophecy.

See Also
Returns
$this
Prophecy\Prophecy\MethodProphecy::shouldBeCalledTimes (   $count)

Sets call times prediction to the prophecy.

See Also
Parameters
$count
Returns
$this
Prophecy\Prophecy\MethodProphecy::shouldHave (   $prediction)

Checks provided prediction immediately.

Parameters
callable | Prediction\PredictionInterface$prediction
Returns
$this
Exceptions
\Prophecy\Exception\InvalidArgumentException
Prophecy\Prophecy\MethodProphecy::shouldHaveBeenCalled ( )

Checks call prediction.

See Also
Returns
$this
Prophecy\Prophecy\MethodProphecy::shouldHaveBeenCalledTimes (   $count)

Checks call times prediction.

See Also
Parameters
int$count
Returns
$this
Prophecy\Prophecy\MethodProphecy::shouldNotBeCalled ( )

Sets no calls prediction to the prophecy.

See Also
Returns
$this
Prophecy\Prophecy\MethodProphecy::shouldNotBeenCalled ( )

Checks no calls prediction.

See Also
Deprecated:
Returns
$this
Prophecy\Prophecy\MethodProphecy::shouldNotHaveBeenCalled ( )

Checks no calls prediction.

See Also
Returns
$this
Prophecy\Prophecy\MethodProphecy::will (   $promise)

Sets custom promise to the prophecy.

Parameters
callable | Promise\PromiseInterface$promise
Returns
$this
Exceptions
\Prophecy\Exception\InvalidArgumentException
Prophecy\Prophecy\MethodProphecy::willReturn ( )

Sets return promise to the prophecy.

See Also
Returns
$this
Prophecy\Prophecy\MethodProphecy::willReturnArgument (   $index = 0)

Sets return argument promise to the prophecy.

Parameters
int$indexThe zero-indexed number of the argument to return
See Also
Returns
$this
Prophecy\Prophecy\MethodProphecy::willThrow (   $exception)

Sets throw promise to the prophecy.

See Also
Parameters
string | \Exception$exceptionException class or instance
Returns
$this
Prophecy\Prophecy\MethodProphecy::withArguments (   $arguments)

Sets argument wildcard.

Parameters
array | Argument\ArgumentsWildcard$arguments
Returns
$this
Exceptions
\Prophecy\Exception\InvalidArgumentException

The documentation for this class was generated from the following file: