<commit_before><?php
/**
 * Plugin Name: E2E Tests Module Setup TagManager API Mock No Account
 * Plugin URI:  https://github.com/google/site-kit-wp
 * Description: Utility plugin for mocking TagManager Setup API requests during E2E tests.
 * Author:      Google
 * Author URI:  https://opensource.google.com
 *
 * @package   Google\Site_Kit
 * @copyright 2019 Google LLC
 * @license   https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
 * @link      https://sitekit.withgoogle.com
 */

use Google\Site_Kit\Core\REST_API\REST_Routes;

add_action(
	'rest_api_init',
	function () {

		register_rest_route(
			REST_Routes::REST_ROOT,
			'modules/tagmanager/data/accounts-containers',
			array(
				'methods'  => 'GET',
				'callback' => function () {
					return array(
						'accounts'   => array(),
						'containers' => array(),
					);
				},
			),
			true
		);

		register_rest_route(
			REST_Routes::REST_ROOT,
			'e2e/setup/tagmanager/account-created',
			array(
				'methods'  => 'POST',
				'callback' => function () {
					require_once ABSPATH . 'wp-admin/includes/plugin.php';

					deactivate_plugins( plugin_basename( __FILE__ ), true );
					activate_plugin( plugin_basename( __DIR__ . '/module-setup-tagmanager.php' ), '', false, true );

					return array(
						'success' => true,
						'result'  => 'account-created',
					);
				},
			)
		);

	},
	0 
);<commit_msg>Update route used in tagmanager no-account mock.<commit_after><?php
/**
 * Plugin Name: E2E Tests Module Setup TagManager API Mock No Account
 * Plugin URI:  https://github.com/google/site-kit-wp
 * Description: Utility plugin for mocking TagManager Setup API requests during E2E tests.
 * Author:      Google
 * Author URI:  https://opensource.google.com
 *
 * @package   Google\Site_Kit
 * @copyright 2019 Google LLC
 * @license   https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
 * @link      https://sitekit.withgoogle.com
 */

use Google\Site_Kit\Core\REST_API\REST_Routes;

add_action(
	'rest_api_init',
	function () {

		register_rest_route(
			REST_Routes::REST_ROOT,
			'modules/tagmanager/data/accounts',
			array(
				'methods'  => 'GET',
				'callback' => function () {
					return array();
				},
			),
			true
		);

		register_rest_route(
			REST_Routes::REST_ROOT,
			'e2e/setup/tagmanager/account-created',
			array(
				'methods'  => 'POST',
				'callback' => function () {
					require_once ABSPATH . 'wp-admin/includes/plugin.php';

					deactivate_plugins( plugin_basename( __FILE__ ), true );
					activate_plugin( plugin_basename( __DIR__ . '/module-setup-tagmanager.php' ), '', false, true );

					return array(
						'success' => true,
						'result'  => 'account-created',
					);
				},
			)
		);

	},
	0
);
{'fraction_non_alphanumeric': 0.1426486683692083, 'fraction_numerical': 0.008755928493250638, 'mean_word_length': 3.050221565731167, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4150565', 'n_tokens_mistral': 1098, 'n_tokens_neox': 907, 'n_words': 188}