public function getCallCount($method) { $this->dieOnNoMethod($method, 'get call count'); $method = strtolower($method); if (!isset($this->call_counts[$method])) { return 0; } return $this->call_counts[$method]; }