File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1010 * Now we include any plugin files that we need to be able to run the tests. This
1111 * should be files that define the functions and classes you're going to test.
1212 */
13+ require_once __DIR__ . '/polyfills.php ' ;
1314require_once __DIR__ . '/../functions.php ' ;
14-
15- function test_escape ( $ value ) {
16- return 'esc_ ' . $ value ;
17- }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ function test_escape ( $ value ) {
4+ return 'esc_ ' . $ value ;
5+ }
6+
7+ function wp_parse_args ( $ args , $ defaults = array () ) {
8+ if ( is_object ( $ args ) ) {
9+ $ parsed_args = get_object_vars ( $ args );
10+ } elseif ( is_array ( $ args ) ) {
11+ $ parsed_args =& $ args ;
12+ } else {
13+ parse_str ( $ args , $ parsed_args );
14+ }
15+
16+ if ( is_array ( $ defaults ) && $ defaults ) {
17+ return array_merge ( $ defaults , $ parsed_args );
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments