PhpSpec\Wrapper\Subject::callOnWrappedObject PHP Method

callOnWrappedObject() public method

public callOnWrappedObject ( string $method, array $arguments = [] ) : Subject
$method string
$arguments array
return Subject
    public function callOnWrappedObject($method, array $arguments = array())
    {
        return $this->caller->call($method, $arguments);
    }

Usage Example

 function it_ignores_any_other_exception(Subject $subject, WrappedObject $wrapped)
 {
     $subject->callOnWrappedObject('getWrappedObject', array())->willThrow('\\Exception');
     $wrapped->getClassName()->willReturn('\\stdClass');
     $this->shouldNotThrow('\\Exception')->duringMatch('be', $subject, array(), $wrapped);
 }