public function verifyNeverInvoked($name, $params = null)
    {
        $calls = $this->getCallsForMethod($name);
        $separator = $this->callSyntax($name);

        if (is_array($params)) {
            if (empty($calls)) {
                return;
            }

            foreach ($calls as $args) {
                if ($this->onlyExpectedArguments($params, $args) === $params) {
                    throw new fail(sprintf($this->neverInvoked, $this->className));
                }
            }
            return;
        }
        if (count($calls)) {
            throw new fail(sprintf($this->neverInvoked, $this->className.$separator.$name));
        }
    }
public function verifyNeverInvoked($name, $params = null)
    {
        $calls = $this->getCallsForMethod($name);
        $separator = $this->callSyntax($name);

        if (is_array($params)) {
            if (empty($calls)) {
                return;
            }

            foreach ($calls as $args) {
                if ($this->onlyExpectedArguments($params, $args) === $params) {
                    throw new fail(sprintf($this->neverInvoked, $this->className));
                }
            }
            return;
        }
        if (count($calls)) {
            throw new fail(sprintf($this->neverInvoked, $this->className.$separator.$name));
        }
    }
public function verifyNeverInvoked ( $ name , $ params = null ) { $ calls = $ this -> getCallsForMethod ( $ name ) ; $ separator = $ this -> callSyntax ( $ name ) ; if ( is_array ( $ params ) ) { if ( empty ( $ calls ) ) { return ; } foreach ( $ calls as $ args ) { if ( $ this -> onlyExpectedArguments ( $ params , $ args ) === $ params ) { throw new fail ( sprintf ( $ this -> neverInvoked , $ this -> className ) ) ; } } return ; } if ( count ( $ calls ) ) { throw new fail ( sprintf ( $ this -> neverInvoked , $ this -> className . $ separator . $ name ) ) ; } }
Verifies that method was not called.
In second argument with which arguments is not expected to be called.

``` php
<?php
$user->setName('davert');
$user->verifyNeverInvoked('setName'); // fail
$user->verifyNeverInvoked('setName',['davert']); // fail
$user->verifyNeverInvoked('setName',['bob']); // success
$user->verifyNeverInvoked('setName',[]); // success
?>
```

@param $name
@param null $params
@throws \PHPUnit\Framework\ExpectationFailedException
Verifies that method was not called . In second argument with which arguments is not expected to be called .