@@ -186,7 +186,7 @@ public function test_execute_no_input() {
186
186
*/
187
187
public function test_before_execute_ability_action () {
188
188
$ action_ability_name = null ;
189
- $ action_input = null ;
189
+ $ action_input = null ;
190
190
191
191
$ args = array_merge (
192
192
self ::$ test_ability_properties ,
@@ -204,13 +204,13 @@ public function test_before_execute_ability_action() {
204
204
205
205
$ callback = static function ( $ ability_name , $ input ) use ( &$ action_ability_name , &$ action_input ) {
206
206
$ action_ability_name = $ ability_name ;
207
- $ action_input = $ input ;
207
+ $ action_input = $ input ;
208
208
};
209
209
210
210
add_action ( 'before_execute_ability ' , $ callback , 10 , 2 );
211
211
212
212
$ ability = new WP_Ability ( self ::$ test_ability_name , $ args );
213
- $ result = $ ability ->execute ( 5 );
213
+ $ result = $ ability ->execute ( 5 );
214
214
215
215
remove_action ( 'before_execute_ability ' , $ callback );
216
216
@@ -224,7 +224,7 @@ public function test_before_execute_ability_action() {
224
224
*/
225
225
public function test_before_execute_ability_action_no_input () {
226
226
$ action_ability_name = null ;
227
- $ action_input = null ;
227
+ $ action_input = null ;
228
228
229
229
$ args = array_merge (
230
230
self ::$ test_ability_properties ,
@@ -237,13 +237,13 @@ public function test_before_execute_ability_action_no_input() {
237
237
238
238
$ callback = static function ( $ ability_name , $ input ) use ( &$ action_ability_name , &$ action_input ) {
239
239
$ action_ability_name = $ ability_name ;
240
- $ action_input = $ input ;
240
+ $ action_input = $ input ;
241
241
};
242
242
243
243
add_action ( 'before_execute_ability ' , $ callback , 10 , 2 );
244
244
245
245
$ ability = new WP_Ability ( self ::$ test_ability_name , $ args );
246
- $ result = $ ability ->execute ();
246
+ $ result = $ ability ->execute ();
247
247
248
248
remove_action ( 'before_execute_ability ' , $ callback );
249
249
@@ -257,8 +257,8 @@ public function test_before_execute_ability_action_no_input() {
257
257
*/
258
258
public function test_after_execute_ability_action () {
259
259
$ action_ability_name = null ;
260
- $ action_input = null ;
261
- $ action_result = null ;
260
+ $ action_input = null ;
261
+ $ action_result = null ;
262
262
263
263
$ args = array_merge (
264
264
self ::$ test_ability_properties ,
@@ -276,14 +276,14 @@ public function test_after_execute_ability_action() {
276
276
277
277
$ callback = static function ( $ ability_name , $ input , $ result ) use ( &$ action_ability_name , &$ action_input , &$ action_result ) {
278
278
$ action_ability_name = $ ability_name ;
279
- $ action_input = $ input ;
280
- $ action_result = $ result ;
279
+ $ action_input = $ input ;
280
+ $ action_result = $ result ;
281
281
};
282
282
283
283
add_action ( 'after_execute_ability ' , $ callback , 10 , 3 );
284
284
285
285
$ ability = new WP_Ability ( self ::$ test_ability_name , $ args );
286
- $ result = $ ability ->execute ( 7 );
286
+ $ result = $ ability ->execute ( 7 );
287
287
288
288
remove_action ( 'after_execute_ability ' , $ callback );
289
289
@@ -298,8 +298,8 @@ public function test_after_execute_ability_action() {
298
298
*/
299
299
public function test_after_execute_ability_action_no_input () {
300
300
$ action_ability_name = null ;
301
- $ action_input = null ;
302
- $ action_result = null ;
301
+ $ action_input = null ;
302
+ $ action_result = null ;
303
303
304
304
$ args = array_merge (
305
305
self ::$ test_ability_properties ,
@@ -313,14 +313,14 @@ public function test_after_execute_ability_action_no_input() {
313
313
314
314
$ callback = static function ( $ ability_name , $ input , $ result ) use ( &$ action_ability_name , &$ action_input , &$ action_result ) {
315
315
$ action_ability_name = $ ability_name ;
316
- $ action_input = $ input ;
317
- $ action_result = $ result ;
316
+ $ action_input = $ input ;
317
+ $ action_result = $ result ;
318
318
};
319
319
320
320
add_action ( 'after_execute_ability ' , $ callback , 10 , 3 );
321
321
322
322
$ ability = new WP_Ability ( self ::$ test_ability_name , $ args );
323
- $ result = $ ability ->execute ();
323
+ $ result = $ ability ->execute ();
324
324
325
325
remove_action ( 'after_execute_ability ' , $ callback );
326
326
@@ -335,7 +335,7 @@ public function test_after_execute_ability_action_no_input() {
335
335
*/
336
336
public function test_actions_not_fired_on_permission_failure () {
337
337
$ before_action_fired = false ;
338
- $ after_action_fired = false ;
338
+ $ after_action_fired = false ;
339
339
340
340
$ args = array_merge (
341
341
self ::$ test_ability_properties ,
@@ -361,7 +361,7 @@ public function test_actions_not_fired_on_permission_failure() {
361
361
add_action ( 'after_execute_ability ' , $ after_callback );
362
362
363
363
$ ability = new WP_Ability ( self ::$ test_ability_name , $ args );
364
- $ result = $ ability ->execute ();
364
+ $ result = $ ability ->execute ();
365
365
366
366
remove_action ( 'before_execute_ability ' , $ before_callback );
367
367
remove_action ( 'after_execute_ability ' , $ after_callback );
@@ -376,7 +376,7 @@ public function test_actions_not_fired_on_permission_failure() {
376
376
*/
377
377
public function test_after_action_not_fired_on_execution_error () {
378
378
$ before_action_fired = false ;
379
- $ after_action_fired = false ;
379
+ $ after_action_fired = false ;
380
380
381
381
$ args = array_merge (
382
382
self ::$ test_ability_properties ,
@@ -399,7 +399,7 @@ public function test_after_action_not_fired_on_execution_error() {
399
399
add_action ( 'after_execute_ability ' , $ after_callback );
400
400
401
401
$ ability = new WP_Ability ( self ::$ test_ability_name , $ args );
402
- $ result = $ ability ->execute ();
402
+ $ result = $ ability ->execute ();
403
403
404
404
remove_action ( 'before_execute_ability ' , $ before_callback );
405
405
remove_action ( 'after_execute_ability ' , $ after_callback );
@@ -414,7 +414,7 @@ public function test_after_action_not_fired_on_execution_error() {
414
414
*/
415
415
public function test_after_action_not_fired_on_output_validation_error () {
416
416
$ before_action_fired = false ;
417
- $ after_action_fired = false ;
417
+ $ after_action_fired = false ;
418
418
419
419
$ args = array_merge (
420
420
self ::$ test_ability_properties ,
@@ -442,7 +442,7 @@ public function test_after_action_not_fired_on_output_validation_error() {
442
442
add_action ( 'after_execute_ability ' , $ after_callback );
443
443
444
444
$ ability = new WP_Ability ( self ::$ test_ability_name , $ args );
445
- $ result = $ ability ->execute ();
445
+ $ result = $ ability ->execute ();
446
446
447
447
remove_action ( 'before_execute_ability ' , $ before_callback );
448
448
remove_action ( 'after_execute_ability ' , $ after_callback );
0 commit comments