public function expectCallCount($method, $count, $message = '%s')
    {
        $this->dieOnNoMethod($method, 'set expected call count');
        $message .= Mock::getExpectationLine();
        $this->expected_counts[strtolower($method)] =
                new CallCountExpectation($method, $count, $message);
    }
public function expectCallCount($method, $count, $message = '%s')
    {
        $this->dieOnNoMethod($method, 'set expected call count');
        $message .= Mock::getExpectationLine();
        $this->expected_counts[strtolower($method)] =
                new CallCountExpectation($method, $count, $message);
    }
public function expectCallCount ( $ method , $ count , $ message = '%s' ) { $ this -> dieOnNoMethod ( $ method , 'set expected call count' ) ; $ message .= Mock :: getExpectationLine ( ) ; $ this -> expected_counts [ strtolower ( $ method ) ] = new CallCountExpectation ( $ method , $ count , $ message ) ; }
Sets an expectation for the number of times a method will be called.
The tally method is used to check this.

@param string $method        Method call to test.
@param int $count        Number of times it should have been called at tally.
@param string $message       Overridden message.
Sets an expectation for the number of times a method will be called . The tally method is used to check this .