parent
12143e597a
commit
0cfb83c50c
2 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Intaro\RetailCrm\Component\Constants;
|
||||
|
||||
/**
|
||||
* Class RetailCrmEventTest
|
||||
*/
|
||||
|
@ -139,6 +141,10 @@ class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
|||
$this->assertEquals(false, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
public function testPaymentSaveWithSyncIntegrationPayment()
|
||||
{
|
||||
RetailcrmConfigProvider::setSyncIntegrationPayment('Y');
|
||||
|
@ -184,7 +190,7 @@ class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
|||
[
|
||||
'externalId' => null,
|
||||
'order' => ['externalId' => 11],
|
||||
'type' => 'testPayment',
|
||||
'type' => 'testPayment' . Constants::CRM_PART_SUBSTITUTED_PAYMENT_CODE,
|
||||
'status' => 'paid',
|
||||
'paidAt' => $date
|
||||
],
|
||||
|
|
|
@ -29,7 +29,9 @@ class RetailCrmOrder_v5Test extends BitrixTestCase {
|
|||
*/
|
||||
public function testOrderSend($arFields, $arParams, $methodApi, $expected)
|
||||
{
|
||||
RetailcrmConfigProvider::setIntegrationPaymentTypes([]);
|
||||
RetailcrmConfigProvider::setCustomFieldsStatus('Y');
|
||||
RetailcrmConfigProvider::setSyncIntegrationPayment('N');
|
||||
|
||||
self::assertEquals($expected, RetailCrmOrder::orderSend(
|
||||
$arFields,
|
||||
|
@ -44,13 +46,14 @@ class RetailCrmOrder_v5Test extends BitrixTestCase {
|
|||
/**
|
||||
* @dataProvider orderSendProvider
|
||||
*/
|
||||
public function testOrderSendWitIntegrationPayment(
|
||||
public function testOrderSendWithIntegrationPayment(
|
||||
array $arFields,
|
||||
array $arParams,
|
||||
string $methodApi,
|
||||
array $expected
|
||||
): void {
|
||||
RetailcrmConfigProvider::setIntegrationPaymentTypes(['testPayment']);
|
||||
RetailcrmConfigProvider::setSyncIntegrationPayment('N');
|
||||
|
||||
$orderSend = RetailCrmOrder::orderSend(
|
||||
$arFields,
|
||||
|
|
Loading…
Add table
Reference in a new issue