Lggr
All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
Prophecy\Prophecy\MethodProphecy Class Reference

Public Member Functions

 withArguments ($arguments)
 
 will ($promise)
 
 willReturn ()
 
 willReturnArgument ($index=0)
 
 willThrow ($exception)
 
 should ($prediction)
 
 shouldBeCalled ()
 
 shouldNotBeCalled ()
 
 shouldBeCalledTimes ($count)
 
 shouldBeCalledOnce ()
 
 shouldHave ($prediction)
 
 shouldHaveBeenCalled ()
 
 shouldNotHaveBeenCalled ()
 
 shouldNotBeenCalled ()
 
 shouldHaveBeenCalledTimes ($count)
 
 shouldHaveBeenCalledOnce ()
 
 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

◆ checkPrediction()

Prophecy\Prophecy\MethodProphecy::checkPrediction ( )

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

◆ getArgumentsWildcard()

Prophecy\Prophecy\MethodProphecy::getArgumentsWildcard ( )

Returns arguments wildcard.

Returns
Argument\ArgumentsWildcard

◆ getCheckedPredictions()

Prophecy\Prophecy\MethodProphecy::getCheckedPredictions ( )

Returns predictions that were checked on this object.

Returns
Prediction\PredictionInterface[]

◆ getMethodName()

Prophecy\Prophecy\MethodProphecy::getMethodName ( )

Returns method name.

Returns
string

◆ getObjectProphecy()

Prophecy\Prophecy\MethodProphecy::getObjectProphecy ( )

Returns object prophecy this method prophecy is tied to.

Returns
ObjectProphecy

◆ getPrediction()

Prophecy\Prophecy\MethodProphecy::getPrediction ( )

Returns currently registered prediction.

Returns
null|Prediction\PredictionInterface

◆ getPromise()

Prophecy\Prophecy\MethodProphecy::getPromise ( )

Returns currently registered promise.

Returns
null|Promise\PromiseInterface

◆ hasReturnVoid()

Prophecy\Prophecy\MethodProphecy::hasReturnVoid ( )
Returns
bool

◆ should()

Prophecy\Prophecy\MethodProphecy::should (   $prediction)

Sets custom prediction to the prophecy.

Parameters
callable | Prediction\PredictionInterface$prediction
Returns
$this
Exceptions

◆ shouldBeCalled()

Prophecy\Prophecy\MethodProphecy::shouldBeCalled ( )

Sets call prediction to the prophecy.

See also
\Prophecy\Prediction\CallPrediction
Returns
$this

◆ shouldBeCalledOnce()

Prophecy\Prophecy\MethodProphecy::shouldBeCalledOnce ( )

Sets call times prediction to the prophecy.

See also
\Prophecy\Prediction\CallTimesPrediction
Returns
$this

◆ shouldBeCalledTimes()

Prophecy\Prophecy\MethodProphecy::shouldBeCalledTimes (   $count)

Sets call times prediction to the prophecy.

See also
\Prophecy\Prediction\CallTimesPrediction
Parameters
$count
Returns
$this

◆ shouldHave()

Prophecy\Prophecy\MethodProphecy::shouldHave (   $prediction)

Checks provided prediction immediately.

Parameters
callable | Prediction\PredictionInterface$prediction
Returns
$this
Exceptions

◆ shouldHaveBeenCalled()

Prophecy\Prophecy\MethodProphecy::shouldHaveBeenCalled ( )

Checks call prediction.

See also
\Prophecy\Prediction\CallPrediction
Returns
$this

◆ shouldHaveBeenCalledOnce()

Prophecy\Prophecy\MethodProphecy::shouldHaveBeenCalledOnce ( )

Checks call times prediction.

See also
\Prophecy\Prediction\CallTimesPrediction
Returns
$this

◆ shouldHaveBeenCalledTimes()

Prophecy\Prophecy\MethodProphecy::shouldHaveBeenCalledTimes (   $count)

Checks call times prediction.

See also
\Prophecy\Prediction\CallTimesPrediction
Parameters
int$count
Returns
$this

◆ shouldNotBeCalled()

Prophecy\Prophecy\MethodProphecy::shouldNotBeCalled ( )

Sets no calls prediction to the prophecy.

See also
\Prophecy\Prediction\NoCallsPrediction
Returns
$this

◆ shouldNotBeenCalled()

Prophecy\Prophecy\MethodProphecy::shouldNotBeenCalled ( )

Checks no calls prediction.

See also
\Prophecy\Prediction\NoCallsPrediction
Deprecated:
Returns
$this

◆ shouldNotHaveBeenCalled()

Prophecy\Prophecy\MethodProphecy::shouldNotHaveBeenCalled ( )

Checks no calls prediction.

See also
\Prophecy\Prediction\NoCallsPrediction
Returns
$this

◆ will()

Prophecy\Prophecy\MethodProphecy::will (   $promise)

Sets custom promise to the prophecy.

Parameters
callable | Promise\PromiseInterface$promise
Returns
$this
Exceptions

◆ willReturn()

Prophecy\Prophecy\MethodProphecy::willReturn ( )

Sets return promise to the prophecy.

See also
\Prophecy\Promise\ReturnPromise
Returns
$this

◆ willReturnArgument()

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
\Prophecy\Promise\ReturnArgumentPromise
Returns
$this

◆ willThrow()

Prophecy\Prophecy\MethodProphecy::willThrow (   $exception)

Sets throw promise to the prophecy.

See also
\Prophecy\Promise\ThrowPromise
Parameters
string | \Exception$exceptionException class or instance
Returns
$this

◆ withArguments()

Prophecy\Prophecy\MethodProphecy::withArguments (   $arguments)

Sets argument wildcard.

Parameters
array | Argument\ArgumentsWildcard$arguments
Returns
$this
Exceptions

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