From 4f5f771438ebaf16a4413d580a5d68888a13aabc Mon Sep 17 00:00:00 2001 From: Daniel Iancu Date: Sat, 30 Nov 2019 12:34:32 +0200 Subject: [PATCH] Add back getActualArguments() to NoMatchingExpectationException This has been removed in #1000 and is breaking backwords compatibility. People are using this method to further customize the reason the test failed based on the actual arguments like Laravel for example: https://github.com/laravel/framework/blob/fd17b307f546f449d24d4eed1725b4941a98b895/src/Illuminate/Foundation/Testing/PendingCommand.php#L139 --- .../Mockery/Exception/NoMatchingExpectationException.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/Mockery/Exception/NoMatchingExpectationException.php b/library/Mockery/Exception/NoMatchingExpectationException.php index 1cb6fca76..c320653e9 100644 --- a/library/Mockery/Exception/NoMatchingExpectationException.php +++ b/library/Mockery/Exception/NoMatchingExpectationException.php @@ -128,6 +128,14 @@ private function setActualArguments($count) return $this; } + /** + * @return array + */ + public function getActualArguments() + { + return $this->actual; + } + /** * @return Mockery\MockInterface */