11<?php
22namespace AspectMock \Proxy ;
3+
4+ use \PHPUnit \Framework \Assert ;
35use \PHPUnit \Framework \ExpectationFailedException as fail ;
46use AspectMock \Util \ArgumentsFormatter ;
57
@@ -118,14 +120,18 @@ public function verifyInvokedMultipleTimes($name, $times, $params = null)
118120 $ equals ++;
119121 }
120122 }
121- if ($ equals == $ times ) return ;
123+ if ($ equals == $ times ) {
124+ Assert::assertTrue (true );
125+ return ;
126+ }
122127 $ params = ArgumentsFormatter::toString ($ params );
123128 throw new fail (sprintf ($ this ->invokedMultipleTimesFail , $ this ->className .$ separator .$ name ."( $ params) " , $ times , $ equals ));
124129 } else if (is_callable ($ params )) {
125130 $ params ($ calls );
126131 }
127132 $ num_calls = count ($ calls );
128133 if ($ num_calls != $ times ) throw new fail (sprintf ($ this ->invokedMultipleTimesFail , $ this ->className .$ separator .$ name , $ times , $ num_calls ));
134+ Assert::assertTrue (true );
129135 }
130136
131137 /**
@@ -153,6 +159,7 @@ public function verifyNeverInvoked($name, $params = null)
153159
154160 if (is_array ($ params )) {
155161 if (empty ($ calls )) {
162+ Assert::assertTrue (true );
156163 return ;
157164 }
158165
@@ -161,11 +168,13 @@ public function verifyNeverInvoked($name, $params = null)
161168 throw new fail (sprintf ($ this ->neverInvoked , $ this ->className ));
162169 }
163170 }
171+ Assert::assertTrue (true );
164172 return ;
165173 }
166174 if (count ($ calls )) {
167175 throw new fail (sprintf ($ this ->neverInvoked , $ this ->className .$ separator .$ name ));
168176 }
177+ Assert::assertTrue (true );
169178 }
170179
171180}
0 commit comments