LimeMockInvocationException.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. * This file is part of the Lime test framework.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  6. * (c) Bernhard Schussek <bernhard.schussek@symfony-project.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. /**
  12. * Thrown when a method invocation should not have been made.
  13. *
  14. * This exception is usually wrapped inside a LimeMockInvocation and should not
  15. * bubble up.
  16. *
  17. * @package Lime
  18. * @author Bernhard Schussek <bernhard.schussek@symfony-project.com>
  19. * @version SVN: $Id: LimeMockInvocationException.php 23864 2009-11-13 18:06:20Z bschussek $
  20. */
  21. class LimeMockInvocationException extends Exception
  22. {
  23. /**
  24. * Constructor.
  25. *
  26. * @param LimeMockInvocation $invocation The erroneous method invocation
  27. * @param string $message The message describing why the
  28. * invocation should not have been
  29. * made. The message is appended
  30. * at the method name.
  31. */
  32. public function __construct(LimeMockInvocation $invocation, $message)
  33. {
  34. parent::__construct($invocation.' '.$message);
  35. }
  36. }