Stub.php 957 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of the phpunit-mock-objects package.
  4. *
  5. * (c) Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. use PHPUnit\Framework\SelfDescribing;
  11. /**
  12. * An object that stubs the process of a normal method for a mock object.
  13. *
  14. * The stub object will replace the code for the stubbed method and return a
  15. * specific value instead of the original value.
  16. */
  17. interface PHPUnit_Framework_MockObject_Stub extends SelfDescribing
  18. {
  19. /**
  20. * Fakes the processing of the invocation $invocation by returning a
  21. * specific value.
  22. *
  23. * @param PHPUnit_Framework_MockObject_Invocation $invocation The invocation which was mocked and matched by the current method and argument matchers
  24. *
  25. * @return mixed
  26. */
  27. public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation);
  28. }