MatcherCollection.php 694 B

1234567891011121314151617181920212223242526
  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. namespace PHPUnit\Framework\MockObject\Stub;
  11. use PHPUnit\Framework\MockObject\Matcher\Invocation;
  12. /**
  13. * Stubs a method by returning a user-defined value.
  14. */
  15. interface MatcherCollection
  16. {
  17. /**
  18. * Adds a new matcher to the collection which can be used as an expectation
  19. * or a stub.
  20. *
  21. * @param Invocation $matcher Matcher for invocations to mock objects
  22. */
  23. public function addMatcher(Invocation $matcher);
  24. }