public function __destruct() { ClassManager::getInstance()->deregister($this->class_name, $this->method_name); Counter::getInstance()->clear($this->fake->hash()); Arguments::getInstance()->clear($this->fake->hash()); if (!$this->assertion_done && ($this->shouldCalledCount !== null || $this->shouldPassedArgs !== null)) { error_log("Some expectations are set but Mock::assert() has not been called. " . "The instance is created at file={$this->file_instance_created}, " . "line={$this->line_instance_created}."); } }
public function count() { return Counter::getInstance()->get($this->hash()); }