1
0
Fork 0
mirror of synced 2025-04-11 05:00:55 +00:00
Правка тестов
This commit is contained in:
Ivan Chaplygin 2024-01-19 14:16:47 +03:00
parent 12143e597a
commit 0cfb83c50c
2 changed files with 11 additions and 2 deletions

View file

@ -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
],

View file

@ -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,