<commit_before><?php
/**
 * Base for integration tests.
 * Contains Customers Downline Tree and other common usage data.
 *
 * User: <NAME> <<EMAIL>>
 */

namespace Praxigento\Core\Lib\Test;

use Magento\Framework\App\ObjectManager;
use Praxigento\Core\Config as Cfg;
use Praxigento\Core\Lib\Context;
use Praxigento\Downline\Data\Entity\Customer;
use Praxigento\Downline\Lib\Service\Customer\Request\Add as CustomerAddRequest;
use Praxigento\Downline\Lib\Service\Snap\Request\Calc as DownlineSnapCalcRequest;

abstract class BaseIntegrationTest extends BaseTestCase
{
    const DATE_PERIOD_BEGIN = '20151201';
    const DEFAULT_DOWNLINE_COUNTRY_CODE = 'LV';
    /** Default stock ID for empty Magento instance. */
    const DEF_STOCK_ID = Cfg::DEF_STOCK_ID;
    /** Default 'admin' website ID for empty Magento instance */
    const DEF_WEBSITE_ID_ADMIN = Cfg::DEF_WEBSITE_ID_ADMIN;
    /** Default 'base' website ID for empty Magento instance */
    const DEF_WEBSITE_ID_BASE = Cfg::DEF_WEBSITE_ID_BASE;
    /** @var \Praxigento\Downline\Lib\Service\ICustomer */
    protected $_callDownlineCustomer;
    /** @var \Praxigento\Downline\Lib\Service\ISnap */
    protected $_callDownlineSnap;
    /** @var  \Praxigento\Core\Lib\Context\Dba\IConnection */
    protected $_conn;
    /** @var  \Psr\Log\LoggerInterface */
    protected $_logger;
    /**
     * Map index by Magento ID (index started from 1).
     *
     * @var array [ $entityId  => $index, ... ]
     */
    protected $_mapCustomerIndexByMageId = [];
    /**
     * Map Magento ID by index (index started from 1).
     *
     * @var array [ $index  => $entityId, ... ]
     */
    protected $_mapCustomerMageIdByIndex = [];
    /** @var  \Praxigento\Core\Lib\Context\IObjectManager */
    protected $_manObj;
    /** @var \Mage_Core_Model_Resource|\Magento\Framework\App\ResourceConnection */
    protected $_resource;
    /** @var  \Praxigento\Core\Lib\IToolbox */
    protected $_toolbox;
    /**
     * Downline tree default dependencies.
     * @var array
     */
    private $DEFAULT_DWNL_TREE = [
        1 => 1,
        2 => 1,
        3 => 1,<commit_msg>MOBI-265 - integration tests in Bonus Hybrid module<commit_after><?php
/**
 * Base for integration tests.
 * Contains Customers Downline Tree and other common usage data.
 *
 * User: <NAME> <<EMAIL>>
 */

namespace Praxigento\Core\Lib\Test;

use Magento\Framework\App\ObjectManager;
use Praxigento\Core\Config as Cfg;
use Praxigento\Core\Lib\Context;
use Praxigento\Downline\Data\Entity\Customer;
use Praxigento\Downline\Lib\Service\Customer\Request\Add as CustomerAddRequest;
use Praxigento\Downline\Lib\Service\Snap\Request\Calc as DownlineSnapCalcRequest;

abstract class BaseIntegrationTest extends BaseTestCase
{
    const DATE_PERIOD_BEGIN = '20151201';
    const DEFAULT_DOWNLINE_COUNTRY_CODE = 'LV';
    /** Default stock ID for empty Magento instance. */
    const DEF_STOCK_ID = Cfg::DEF_STOCK_ID;
    /** Default 'admin' website ID for empty Magento instance */
    const DEF_WEBSITE_ID_ADMIN = Cfg::DEF_WEBSITE_ID_ADMIN;
    /** Default 'base' website ID for empty Magento instance */
    const DEF_WEBSITE_ID_BASE = Cfg::DEF_WEBSITE_ID_BASE;
    /** @var \Praxigento\Downline\Lib\Service\ICustomer */
    protected $_callDownlineCustomer;
    /** @var \Praxigento\Downline\Lib\Service\ISnap */
    protected $_callDownlineSnap;
    /** @var  \Praxigento\Core\Lib\Context\Dba\IConnection */
    protected $_conn;
    /** @var  \Psr\Log\LoggerInterface */
    protected $_logger;
    /**
     * Map index by Magento ID (index started from 1).
     *
     * @var array [ $entityId  => $index, ... ]
     */
    protected $_mapCustomerIndexByMageId = [];
    /**
     * Map Magento ID by index (index started from 1).
     *
     * @var array [ $index  => $entityId, ... ]
     */
    protected $_mapCustomerMageIdByIndex = [];
    /** @var  \Praxigento\Core\Lib\Context\IObjectManager */
    protected $_manObj;
    /** @var \Mage_Core_Model_Resource|\Magento\Framework\App\ResourceConnection */
    protected $_resource;
    /** @var  \Praxigento\Core\Lib\IToolbox */
    protected $_toolbox;
    /**
     * Downline tree default dependencies.
     * @var array
     */
    protected $DEFAULT_DWNL_TREE = [
        1 => 1,
        2 => 1,
        3 => 1,
{'fraction_non_alphanumeric': 0.12307692307692308, 'fraction_numerical': 0.008158508158508158, 'mean_word_length': 3.094465648854962, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3807596', 'n_tokens_mistral': 1443, 'n_tokens_neox': 1403, 'n_words': 309}