Mockable.php 505 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. class Mockable
  3. {
  4. public $constructorArgs;
  5. public $cloned;
  6. public function __construct($arg1 = null, $arg2 = null)
  7. {
  8. $this->constructorArgs = array($arg1, $arg2);
  9. }
  10. public function mockableMethod()
  11. {
  12. // something different from NULL
  13. return true;
  14. }
  15. public function anotherMockableMethod()
  16. {
  17. // something different from NULL
  18. return true;
  19. }
  20. public function __clone()
  21. {
  22. $this->cloned = true;
  23. }
  24. }