helpers.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. use Mockery\Matcher\AndAnyOtherArgs;
  3. use Mockery\Matcher\AnyArgs;
  4. /**
  5. * Mockery
  6. *
  7. * LICENSE
  8. *
  9. * This source file is subject to the new BSD license that is bundled
  10. * with this package in the file LICENSE.txt.
  11. * It is also available through the world-wide-web at this URL:
  12. * http://github.com/padraic/mockery/blob/master/LICENSE
  13. * If you did not receive a copy of the license and are unable to
  14. * obtain it through the world-wide-web, please send an email
  15. * to padraic@php.net so we can send you a copy immediately.
  16. *
  17. * @category Mockery
  18. * @package Mockery
  19. * @copyright Copyright (c) 2016 Dave Marshall
  20. * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
  21. */
  22. if (!function_exists("mock")) {
  23. function mock(...$args)
  24. {
  25. return Mockery::mock(...$args);
  26. }
  27. }
  28. if (!function_exists("spy")) {
  29. function spy(...$args)
  30. {
  31. return Mockery::spy(...$args);
  32. }
  33. }
  34. if (!function_exists("namedMock")) {
  35. function namedMock(...$args)
  36. {
  37. return Mockery::namedMock(...$args);
  38. }
  39. }
  40. if (!function_exists("anyArgs")) {
  41. function anyArgs()
  42. {
  43. return new AnyArgs();
  44. }
  45. }
  46. if (!function_exists("andAnyOtherArgs")) {
  47. function andAnyOtherArgs()
  48. {
  49. return new AndAnyOtherArgs();
  50. }
  51. }
  52. if (!function_exists("andAnyOthers")) {
  53. function andAnyOthers()
  54. {
  55. return new AndAnyOtherArgs();
  56. }
  57. }