PhpSpec\Wrapper\Subject::callExpectation PHP Method

callExpectation() private method

private callExpectation ( string $method, array $arguments ) : mixed
$method string
$arguments array
return mixed
    private function callExpectation($method, array $arguments)
    {
        $subject = $this->makeSureWeHaveASubject();
        $expectation = $this->expectationFactory->create($method, $subject, $arguments);
        if (0 === strpos($method, 'shouldNot')) {
            return $expectation->match(lcfirst(substr($method, 9)), $this, $arguments, $this->wrappedObject);
        }
        return $expectation->match(lcfirst(substr($method, 6)), $this, $arguments, $this->wrappedObject);
    }