PHP Class Prophecy\Argument\Token\ObjectStateToken

Author: Konstantin Kudryashov ([email protected])
Inheritance: implements Prophecy\Argument\Token\TokenInterface
Show file Open project: phpspec/prophecy

Public Methods

Method Description
__construct ( string $methodName, mixed $value, Prophecy\Util\StringUtil $util = null, Prophecy\Comparator\Factory $comparatorFactory = null ) Initializes token.
__toString ( ) : string Returns string representation for token.
isLast ( ) : boolean Returns false.
scoreArgument ( mixed $argument ) : boolean | integer Scores 8 if argument is an object, which method returns expected value.

Method Details

__construct() public method

Initializes token.
public __construct ( string $methodName, mixed $value, Prophecy\Util\StringUtil $util = null, Prophecy\Comparator\Factory $comparatorFactory = null )
$methodName string
$value mixed Expected return value
$util Prophecy\Util\StringUtil
$comparatorFactory Prophecy\Comparator\Factory

__toString() public method

Returns string representation for token.
public __toString ( ) : string
return string

isLast() public method

Returns false.
public isLast ( ) : boolean
return boolean

scoreArgument() public method

Scores 8 if argument is an object, which method returns expected value.
public scoreArgument ( mixed $argument ) : boolean | integer
$argument mixed
return boolean | integer