Ejemplo n.º 1
0
 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}.");
     }
 }
Ejemplo n.º 2
0
 public function count()
 {
     return Counter::getInstance()->get($this->hash());
 }