@@ -34,29 +34,31 @@ public function extension_data()
3434 ];
3535
3636 return [
37- [27 , './tests/events/invalid_name_long_multi.php ' , 'rxu.PostsMerging.posts_merging_end ' , $ expected_vars , $ expected_errors ],
38- [17 , './tests/events/invalid_name_long_single.php ' , 'rxu.PostsMerging.posts_merging_end ' , $ expected_vars , $ expected_errors ],
39- [27 , './tests/events/invalid_name_short_multi.php ' , 'rxu.PostsMerging.posts_merging_end ' , $ expected_vars , $ expected_errors ],
40- [17 , './tests/events/invalid_name_short_single.php ' , 'rxu.PostsMerging.posts_merging_end ' , $ expected_vars , $ expected_errors ],
41- [7 , './tests/events/invalid_name_simple.php ' , 'rxu.PostsMerging.posts_merging_end ' , [], $ expected_errors ],
42- [27 , './tests/events/valid_name_long_multi.php ' , 'rxu.postsmerging.posts_merging_end ' , $ expected_vars ],
43- [17 , './tests/events/valid_name_long_single.php ' , 'rxu.postsmerging.posts_merging_end ' , $ expected_vars ],
44- [27 , './tests/events/valid_name_short_multi.php ' , 'rxu.postsmerging.posts_merging_end ' , $ expected_vars ],
45- [17 , './tests/events/valid_name_short_single.php ' , 'rxu.postsmerging.posts_merging_end ' , $ expected_vars ],
46- [7 , './tests/events/valid_name_simple.php ' , 'rxu.postsmerging.posts_merging_end ' , []],
37+ [27 , './tests/events/invalid_name_long_multi.php ' , false , 'rxu.PostsMerging.posts_merging_end ' , $ expected_vars , $ expected_errors ],
38+ [17 , './tests/events/invalid_name_long_single.php ' , false , 'rxu.PostsMerging.posts_merging_end ' , $ expected_vars , $ expected_errors ],
39+ [27 , './tests/events/invalid_name_short_multi.php ' , false , 'rxu.PostsMerging.posts_merging_end ' , $ expected_vars , $ expected_errors ],
40+ [17 , './tests/events/invalid_name_short_single.php ' , false , 'rxu.PostsMerging.posts_merging_end ' , $ expected_vars , $ expected_errors ],
41+ [7 , './tests/events/invalid_name_simple.php ' , false , 'rxu.PostsMerging.posts_merging_end ' , [], $ expected_errors ],
42+ [7 , './tests/events/invalid_name_simple_dispatch.php ' , true , 'rxu.PostsMerging.posts_merging_end ' , [], $ expected_errors ],
43+ [27 , './tests/events/valid_name_long_multi.php ' , false , 'rxu.postsmerging.posts_merging_end ' , $ expected_vars ],
44+ [17 , './tests/events/valid_name_long_single.php ' , false , 'rxu.postsmerging.posts_merging_end ' , $ expected_vars ],
45+ [27 , './tests/events/valid_name_short_multi.php ' , false , 'rxu.postsmerging.posts_merging_end ' , $ expected_vars ],
46+ [17 , './tests/events/valid_name_short_single.php ' , false , 'rxu.postsmerging.posts_merging_end ' , $ expected_vars ],
47+ [7 , './tests/events/valid_name_simple.php ' , false , 'rxu.postsmerging.posts_merging_end ' , []],
48+ [7 , './tests/events/valid_name_simple_dispatch.php ' , true , 'rxu.postsmerging.posts_merging_end ' , []],
4749 ];
4850 }
4951
5052 /**
5153 * @dataProvider extension_data
5254 */
53- public function test_event_name ($ line , $ content , $ expected_name , $ expected_vars , $ expected_errors = [])
55+ public function test_event_name ($ line , $ content , $ is_dispatch , $ expected_name , $ expected_vars , $ expected_errors = [])
5456 {
5557 $ output = new Output ();
5658 $ exporter = new php_exporter ($ output , '' );
5759 $ exporter ->set_content (explode ("\n" , file_get_contents ($ content )));
5860
59- $ name = $ exporter ->get_event_name ($ line , false );
61+ $ name = $ exporter ->get_event_name ($ line , $ is_dispatch );
6062 $ exporter ->set_current_event ($ name , $ line );
6163 $ vars = $ expected_vars ? $ exporter ->get_vars_from_array (false ) : [];
6264
0 commit comments