src/main/php/Verification.php
public function wasCalledOnce(): bool
    {
        $callsReceived = count($this->invocations);
        if (1 !== $callsReceived) {
            throw new CallAmountViolation(sprintf(
                    '%s was expected to be called once, but actually %s.',
                    $this->invocations->name(),
                    1 < $callsReceived ?
                        'called ' . $callsReceived . ' time(s)' :
                        'never called'

            ));
        }

        return true;
    }
public function wasCalledOnce(): bool
    {
        $callsReceived = count($this->invocations);
        if (1 !== $callsReceived) {
            throw new CallAmountViolation(sprintf(
                    '%s was expected to be called once, but actually %s.',
                    $this->invocations->name(),
                    1 < $callsReceived ?
                        'called ' . $callsReceived . ' time(s)' :
                        'never called'

            ));
        }

        return true;
    }
public function wasCalledOnce ( ) : bool { $ callsReceived = count ( $ this -> invocations ) ; if ( 1 !== $ callsReceived ) { throw new CallAmountViolation ( sprintf ( '%s was expected to be called once, but actually %s.' , $ this -> invocations -> name ( ) , 1 < $ callsReceived ? 'called ' . $ callsReceived . ' time(s)' : 'never called' ) ) ; } return true ; }
verifies that the method on the class was called exactly once

@api
@return  bool
@throws  \bovigo\callmap\CallAmountViolation
verifies that the method on the class was called exactly once