Mockable.php 500 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. class Mockable
  3. {
  4. public $constructorArgs;
  5. public $cloned;
  6. public function __construct($arg1 = null, $arg2 = null)
  7. {
  8. $this->constructorArgs = [$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. }