[ 'priority' => 1, 'accepted_args' => 1, ], ]; $this->assertHooked( 'personal_options_update', 'WP_Auth0_EditProfile', $expect_hooked ); // Test page-specific JS enqueuing. $expect_hooked = [ 'admin_enqueue_scripts' => [ 'priority' => 10, 'accepted_args' => 1, ], ]; $pagenow = 'profile.php'; $this->clear_hooks( 'admin_enqueue_scripts' ); self::$editProfile->init(); $this->assertHooked( 'admin_enqueue_scripts', 'WP_Auth0_EditProfile', $expect_hooked ); $pagenow = 'user-edit.php'; $this->clear_hooks( 'admin_enqueue_scripts' ); self::$editProfile->init(); $this->assertHooked( 'admin_enqueue_scripts', 'WP_Auth0_EditProfile', $expect_hooked ); } }