src/Verify/Verify.php
private function getChainedMockCounter($methods)
    {
        $mockReturnValues = ShortifyPunit::getReturnValues();

        $mockResponse = $mockReturnValues[$this->mockedClass][$this->instanceId];

        foreach ($methods as $method)
        {
            $methodName = key($method);
            $args = $method[$methodName];
            $serializedArgs = serialize($args);

            if ( ! isset($mockResponse[$methodName][$serializedArgs]))
            {
                if ( ! isset($mockResponse[$methodName])) {
                    break;
                }

                // try to finding matching Hamcrest-API Function (anything(), equalTo())
                $serializedArgs = static::checkMatchingArguments($mockResponse[$methodName], $args);

                if (is_null($serializedArgs)) {
                    break;
                }
            }

            $mockResponse = $mockResponse[$methodName][$serializedArgs];
        }

        return isset($mockResponse['response']['counter']) ? $mockResponse['response']['counter'] : 0;
    }
private function getChainedMockCounter($methods)
    {
        $mockReturnValues = ShortifyPunit::getReturnValues();

        $mockResponse = $mockReturnValues[$this->mockedClass][$this->instanceId];

        foreach ($methods as $method)
        {
            $methodName = key($method);
            $args = $method[$methodName];
            $serializedArgs = serialize($args);

            if ( ! isset($mockResponse[$methodName][$serializedArgs]))
            {
                if ( ! isset($mockResponse[$methodName])) {
                    break;
                }

                // try to finding matching Hamcrest-API Function (anything(), equalTo())
                $serializedArgs = static::checkMatchingArguments($mockResponse[$methodName], $args);

                if (is_null($serializedArgs)) {
                    break;
                }
            }

            $mockResponse = $mockResponse[$methodName][$serializedArgs];
        }

        return isset($mockResponse['response']['counter']) ? $mockResponse['response']['counter'] : 0;
    }
private function getChainedMockCounter ( $ methods ) { $ mockReturnValues = ShortifyPunit :: getReturnValues ( ) ; $ mockResponse = $ mockReturnValues [ $ this -> mockedClass ] [ $ this -> instanceId ] ; foreach ( $ methods as $ method ) { $ methodName = key ( $ method ) ; $ args = $ method [ $ methodName ] ; $ serializedArgs = serialize ( $ args ) ; if ( ! isset ( $ mockResponse [ $ methodName ] [ $ serializedArgs ] ) ) { if ( ! isset ( $ mockResponse [ $ methodName ] ) ) { break ; } // try to finding matching Hamcrest-API Function (anything(), equalTo()) $ serializedArgs = static :: checkMatchingArguments ( $ mockResponse [ $ methodName ] , $ args ) ; if ( is_null ( $ serializedArgs ) ) { break ; } } $ mockResponse = $ mockResponse [ $ methodName ] [ $ serializedArgs ] ; } return isset ( $ mockResponse [ 'response' ] [ 'counter' ] ) ? $ mockResponse [ 'response' ] [ 'counter' ] : 0 ; }
Getting the call counter for the specific chained
stubbing methods

@param $methods
@return int
Getting the call counter for the specific chained stubbing methods