1
1
<?php
2
2
namespace AspectMock \Proxy ;
3
+
4
+ use \PHPUnit \Framework \Assert ;
3
5
use \PHPUnit \Framework \ExpectationFailedException as fail ;
4
6
use AspectMock \Util \ArgumentsFormatter ;
5
7
@@ -118,14 +120,18 @@ public function verifyInvokedMultipleTimes($name, $times, $params = null)
118
120
$ equals ++;
119
121
}
120
122
}
121
- if ($ equals == $ times ) return ;
123
+ if ($ equals == $ times ) {
124
+ Assert::assertTrue (true );
125
+ return ;
126
+ }
122
127
$ params = ArgumentsFormatter::toString ($ params );
123
128
throw new fail (sprintf ($ this ->invokedMultipleTimesFail , $ this ->className .$ separator .$ name ."( $ params) " , $ times , $ equals ));
124
129
} else if (is_callable ($ params )) {
125
130
$ params ($ calls );
126
131
}
127
132
$ num_calls = count ($ calls );
128
133
if ($ num_calls != $ times ) throw new fail (sprintf ($ this ->invokedMultipleTimesFail , $ this ->className .$ separator .$ name , $ times , $ num_calls ));
134
+ Assert::assertTrue (true );
129
135
}
130
136
131
137
/**
@@ -153,6 +159,7 @@ public function verifyNeverInvoked($name, $params = null)
153
159
154
160
if (is_array ($ params )) {
155
161
if (empty ($ calls )) {
162
+ Assert::assertTrue (true );
156
163
return ;
157
164
}
158
165
@@ -161,11 +168,13 @@ public function verifyNeverInvoked($name, $params = null)
161
168
throw new fail (sprintf ($ this ->neverInvoked , $ this ->className ));
162
169
}
163
170
}
171
+ Assert::assertTrue (true );
164
172
return ;
165
173
}
166
174
if (count ($ calls )) {
167
175
throw new fail (sprintf ($ this ->neverInvoked , $ this ->className .$ separator .$ name ));
168
176
}
177
+ Assert::assertTrue (true );
169
178
}
170
179
171
180
}
0 commit comments