Skip to content

Commit

Permalink
Implement the bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Sep 16, 2021
1 parent 717d7fc commit 1ace7b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion library/Mockery/Expectation.php
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,12 @@ public function times($limit = null)
throw new \InvalidArgumentException('The passed Times limit should be an integer value');
}
$this->_countValidators[$this->_countValidatorClass] = new $this->_countValidatorClass($this, $limit);
$this->_countValidatorClass = 'Mockery\CountValidator\Exact';

if('Mockery\CountValidator\Exact' !== $this->_countValidatorClass){
$this->_countValidatorClass = 'Mockery\CountValidator\Exact';
unset($this->_countValidators[$this->_countValidatorClass]);
}

return $this;
}

Expand Down

0 comments on commit 1ace7b2

Please sign in to comment.