@@ -153,17 +153,17 @@ public function testNamedArguments(): void {
153153 $ this ->emitter ->emitEvent ('Test ' , 'test ' , ['foo ' => 'foo ' , 'bar ' => 'bar ' ]);
154154 }
155155
156+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
156157 public function testRemoveAllSpecified (): void {
157158 $ listener = function (): void {
158159 throw new EmittedException ;
159160 };
160161 $ this ->emitter ->listen ('Test ' , 'test ' , $ listener );
161162 $ this ->emitter ->removeListener ('Test ' , 'test ' , $ listener );
162163 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
163-
164- $ this ->addToAssertionCount (1 );
165164 }
166165
166+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
167167 public function testRemoveWildcardListener (): void {
168168 $ listener1 = function (): void {
169169 throw new EmittedException ;
@@ -175,10 +175,9 @@ public function testRemoveWildcardListener(): void {
175175 $ this ->emitter ->listen ('Test ' , 'test ' , $ listener2 );
176176 $ this ->emitter ->removeListener ('Test ' , 'test ' );
177177 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
178-
179- $ this ->addToAssertionCount (1 );
180178 }
181179
180+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
182181 public function testRemoveWildcardMethod (): void {
183182 $ listener = function (): void {
184183 throw new EmittedException ;
@@ -188,10 +187,9 @@ public function testRemoveWildcardMethod(): void {
188187 $ this ->emitter ->removeListener ('Test ' , null , $ listener );
189188 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
190189 $ this ->emitter ->emitEvent ('Test ' , 'foo ' );
191-
192- $ this ->addToAssertionCount (1 );
193190 }
194191
192+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
195193 public function testRemoveWildcardScope (): void {
196194 $ listener = function (): void {
197195 throw new EmittedException ;
@@ -201,10 +199,9 @@ public function testRemoveWildcardScope(): void {
201199 $ this ->emitter ->removeListener (null , 'test ' , $ listener );
202200 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
203201 $ this ->emitter ->emitEvent ('Bar ' , 'test ' );
204-
205- $ this ->addToAssertionCount (1 );
206202 }
207203
204+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
208205 public function testRemoveWildcardScopeAndMethod (): void {
209206 $ listener = function (): void {
210207 throw new EmittedException ;
@@ -216,8 +213,6 @@ public function testRemoveWildcardScopeAndMethod(): void {
216213 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
217214 $ this ->emitter ->emitEvent ('Test ' , 'foo ' );
218215 $ this ->emitter ->emitEvent ('Bar ' , 'foo ' );
219-
220- $ this ->addToAssertionCount (1 );
221216 }
222217
223218
@@ -234,8 +229,6 @@ public function testRemoveKeepOtherCallback(): void {
234229 $ this ->emitter ->listen ('Test ' , 'test ' , $ listener2 );
235230 $ this ->emitter ->removeListener ('Test ' , 'test ' , $ listener1 );
236231 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
237-
238- $ this ->addToAssertionCount (1 );
239232 }
240233
241234
@@ -249,8 +242,6 @@ public function testRemoveKeepOtherMethod(): void {
249242 $ this ->emitter ->listen ('Test ' , 'foo ' , $ listener );
250243 $ this ->emitter ->removeListener ('Test ' , 'foo ' , $ listener );
251244 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
252-
253- $ this ->addToAssertionCount (1 );
254245 }
255246
256247
@@ -264,8 +255,6 @@ public function testRemoveKeepOtherScope(): void {
264255 $ this ->emitter ->listen ('Bar ' , 'test ' , $ listener );
265256 $ this ->emitter ->removeListener ('Bar ' , 'test ' , $ listener );
266257 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
267-
268- $ this ->addToAssertionCount (1 );
269258 }
270259
271260
@@ -278,7 +267,5 @@ public function testRemoveNonExistingName(): void {
278267 $ this ->emitter ->listen ('Test ' , 'test ' , $ listener );
279268 $ this ->emitter ->removeListener ('Bar ' , 'test ' , $ listener );
280269 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
281-
282- $ this ->addToAssertionCount (1 );
283270 }
284271}
0 commit comments