1
0
mirror of synced 2024-12-05 03:36:05 +03:00
bitrix-module/tests/classes/general/collector/RetailCrmCollectorTest.php
Akolzin Dmitry 86a51c8401
Update CI build (#96)
* cli Bitrix installation
* update travis config
* update installer
2020-03-23 15:12:07 +03:00

33 lines
783 B
PHP
Executable File

<?php
class RetailCrmCollectorTest extends \PHPUnit\Framework\TestCase
{
const TEST_KEY = 'RC-XXXXXXXXXX-X';
public function setUp()
{
parent::setUp();
COption::SetOptionString(
RetailCrmCollector::$MODULE_ID,
RetailCrmCollector::$CRM_COLL_KEY,
serialize([SITE_ID => self::TEST_KEY])
);
COption::SetOptionString(
RetailCrmCollector::$MODULE_ID,
RetailCrmCollector::$CRM_COLL,
'Y'
);
}
public function testAdd()
{
RetailCrmCollector::add();
$strings = \Bitrix\Main\Page\Asset::getInstance()->getStrings();
$this->assertContains(self::TEST_KEY, $strings);
$this->assertContains('customerId', $strings);
}
}