From 900446e8301568c295c29c0b630dd4dd42ba9a32 Mon Sep 17 00:00:00 2001 From: IgorM Date: Tue, 6 Dec 2016 16:50:07 +0000 Subject: [PATCH] Fixed missing function problem with mock proxy #279 + it prevented starting controller unit tests --- lib/EcomDev/PHPUnit/Mock/Proxy.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/EcomDev/PHPUnit/Mock/Proxy.php b/lib/EcomDev/PHPUnit/Mock/Proxy.php index 53e797dc..bc9114a9 100644 --- a/lib/EcomDev/PHPUnit/Mock/Proxy.php +++ b/lib/EcomDev/PHPUnit/Mock/Proxy.php @@ -215,5 +215,13 @@ public function __call($name, $arguments) ); } - -} \ No newline at end of file + + public function __phpunit_hasMatchers() + { + throw new RuntimeException( + 'Mock object proxy cannot be used for retrieving invocation mockers, ' + . 'use getMockInstance method for real mock object' + ); + } + +}