@@ -148,17 +148,17 @@ public function testNamedArguments(): void {
148148 $ this ->emitter ->emitEvent ('Test ' , 'test ' , ['foo ' => 'foo ' , 'bar ' => 'bar ' ]);
149149 }
150150
151+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
151152 public function testRemoveAllSpecified (): void {
152153 $ listener = function (): void {
153154 throw new EmittedException ;
154155 };
155156 $ this ->emitter ->listen ('Test ' , 'test ' , $ listener );
156157 $ this ->emitter ->removeListener ('Test ' , 'test ' , $ listener );
157158 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
158-
159- $ this ->addToAssertionCount (1 );
160159 }
161160
161+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
162162 public function testRemoveWildcardListener (): void {
163163 $ listener1 = function (): void {
164164 throw new EmittedException ;
@@ -170,10 +170,9 @@ public function testRemoveWildcardListener(): void {
170170 $ this ->emitter ->listen ('Test ' , 'test ' , $ listener2 );
171171 $ this ->emitter ->removeListener ('Test ' , 'test ' );
172172 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
173-
174- $ this ->addToAssertionCount (1 );
175173 }
176174
175+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
177176 public function testRemoveWildcardMethod (): void {
178177 $ listener = function (): void {
179178 throw new EmittedException ;
@@ -183,10 +182,9 @@ public function testRemoveWildcardMethod(): void {
183182 $ this ->emitter ->removeListener ('Test ' , null , $ listener );
184183 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
185184 $ this ->emitter ->emitEvent ('Test ' , 'foo ' );
186-
187- $ this ->addToAssertionCount (1 );
188185 }
189186
187+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
190188 public function testRemoveWildcardScope (): void {
191189 $ listener = function (): void {
192190 throw new EmittedException ;
@@ -196,10 +194,9 @@ public function testRemoveWildcardScope(): void {
196194 $ this ->emitter ->removeListener (null , 'test ' , $ listener );
197195 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
198196 $ this ->emitter ->emitEvent ('Bar ' , 'test ' );
199-
200- $ this ->addToAssertionCount (1 );
201197 }
202198
199+ #[\PHPUnit \Framework \Attributes \DoesNotPerformAssertions]
203200 public function testRemoveWildcardScopeAndMethod (): void {
204201 $ listener = function (): void {
205202 throw new EmittedException ;
@@ -211,8 +208,6 @@ public function testRemoveWildcardScopeAndMethod(): void {
211208 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
212209 $ this ->emitter ->emitEvent ('Test ' , 'foo ' );
213210 $ this ->emitter ->emitEvent ('Bar ' , 'foo ' );
214-
215- $ this ->addToAssertionCount (1 );
216211 }
217212
218213 public function testRemoveKeepOtherCallback (): void {
@@ -228,8 +223,6 @@ public function testRemoveKeepOtherCallback(): void {
228223 $ this ->emitter ->listen ('Test ' , 'test ' , $ listener2 );
229224 $ this ->emitter ->removeListener ('Test ' , 'test ' , $ listener1 );
230225 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
231-
232- $ this ->addToAssertionCount (1 );
233226 }
234227
235228 public function testRemoveKeepOtherMethod (): void {
@@ -242,8 +235,6 @@ public function testRemoveKeepOtherMethod(): void {
242235 $ this ->emitter ->listen ('Test ' , 'foo ' , $ listener );
243236 $ this ->emitter ->removeListener ('Test ' , 'foo ' , $ listener );
244237 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
245-
246- $ this ->addToAssertionCount (1 );
247238 }
248239
249240 public function testRemoveKeepOtherScope (): void {
@@ -256,8 +247,6 @@ public function testRemoveKeepOtherScope(): void {
256247 $ this ->emitter ->listen ('Bar ' , 'test ' , $ listener );
257248 $ this ->emitter ->removeListener ('Bar ' , 'test ' , $ listener );
258249 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
259-
260- $ this ->addToAssertionCount (1 );
261250 }
262251
263252 public function testRemoveNonExistingName (): void {
@@ -269,7 +258,5 @@ public function testRemoveNonExistingName(): void {
269258 $ this ->emitter ->listen ('Test ' , 'test ' , $ listener );
270259 $ this ->emitter ->removeListener ('Bar ' , 'test ' , $ listener );
271260 $ this ->emitter ->emitEvent ('Test ' , 'test ' );
272-
273- $ this ->addToAssertionCount (1 );
274261 }
275262}
0 commit comments