public function check(array $calls, FunctionProphecy $prophecy)
    {
        if (count($calls)) {
            return;
        }

        $methodCalls = $prophecy->getNamespace()->findCalls($prophecy->getName(), new ArgumentsWildcard([new AnyValuesToken()]));

        if (count($methodCalls)) {
            throw new NoCallsException(sprintf(
                "No calls have been made that match:\n".
                "  %s(%s)\n".
                "but expected at least one.\n".
                "Recorded `%s(...)` calls:\n%s",

                $prophecy->getName(),
                $prophecy->getArgumentsWildcard(),
                $prophecy->getName(),
                $this->util->stringifyCalls($methodCalls)
            ));
        }

        throw new NoCallsException(sprintf(
            "No calls have been made that match:\n".
            "  %s(%s)\n".
            'but expected at least one.',

            $prophecy->getName(),
            $prophecy->getArgumentsWildcard()
        ));
    }
public function check(array $calls, FunctionProphecy $prophecy)
    {
        if (count($calls)) {
            return;
        }

        $methodCalls = $prophecy->getNamespace()->findCalls($prophecy->getName(), new ArgumentsWildcard([new AnyValuesToken()]));

        if (count($methodCalls)) {
            throw new NoCallsException(sprintf(
                "No calls have been made that match:\n".
                "  %s(%s)\n".
                "but expected at least one.\n".
                "Recorded `%s(...)` calls:\n%s",

                $prophecy->getName(),
                $prophecy->getArgumentsWildcard(),
                $prophecy->getName(),
                $this->util->stringifyCalls($methodCalls)
            ));
        }

        throw new NoCallsException(sprintf(
            "No calls have been made that match:\n".
            "  %s(%s)\n".
            'but expected at least one.',

            $prophecy->getName(),
            $prophecy->getArgumentsWildcard()
        ));
    }
public function check ( array $ calls , FunctionProphecy $ prophecy ) { if ( count ( $ calls ) ) { return ; } $ methodCalls = $ prophecy -> getNamespace ( ) -> findCalls ( $ prophecy -> getName ( ) , new ArgumentsWildcard ( [ new AnyValuesToken ( ) ] ) ) ; if ( count ( $ methodCalls ) ) { throw new NoCallsException ( sprintf ( "No calls have been made that match:\n" . "  %s(%s)\n" . "but expected at least one.\n" . "Recorded `%s(...)` calls:\n%s" , $ prophecy -> getName ( ) , $ prophecy -> getArgumentsWildcard ( ) , $ prophecy -> getName ( ) , $ this -> util -> stringifyCalls ( $ methodCalls ) ) ) ; } throw new NoCallsException ( sprintf ( "No calls have been made that match:\n" . "  %s(%s)\n" . 'but expected at least one.' , $ prophecy -> getName ( ) , $ prophecy -> getArgumentsWildcard ( ) ) ) ; }
Tests that there was at least one call.

@param Call[]         $calls
@param FunctionProphecy $prophecy

@throws NoCallsException
Tests that there was at least one call .