2017-06-22 00:55:08 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PHP version 5.4
|
|
|
|
*
|
|
|
|
* API client marketplace test class
|
|
|
|
*
|
|
|
|
* @category RetailCrm
|
|
|
|
* @package RetailCrm
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace RetailCrm\Tests\Methods\Version5;
|
|
|
|
|
|
|
|
use RetailCrm\Test\TestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class ApiClientMarketplaceTest
|
|
|
|
*
|
2018-01-10 11:35:57 +03:00
|
|
|
* @category RetailCrm
|
|
|
|
* @package RetailCrm
|
2017-06-22 00:55:08 +03:00
|
|
|
*/
|
|
|
|
class ApiClientMarketplaceTest extends TestCase
|
|
|
|
{
|
2017-11-17 15:02:54 +03:00
|
|
|
const SERVICE_NAME = 'Marketplace integration v5';
|
|
|
|
const SERVICE_CODE = 'integration_v5';
|
2017-06-22 00:55:08 +03:00
|
|
|
|
|
|
|
/**
|
2018-01-10 11:35:57 +03:00
|
|
|
* Test configuration
|
|
|
|
*
|
2017-06-22 00:55:08 +03:00
|
|
|
* @group marketplace_v5
|
2018-01-10 11:35:57 +03:00
|
|
|
*
|
|
|
|
* @return void
|
2017-06-22 00:55:08 +03:00
|
|
|
*/
|
|
|
|
public function testConfigurationEdit()
|
|
|
|
{
|
2017-11-17 15:02:54 +03:00
|
|
|
$client = static::getApiClient();
|
2017-06-22 00:55:08 +03:00
|
|
|
|
2018-01-10 11:35:57 +03:00
|
|
|
/**
|
|
|
|
* Response
|
|
|
|
*
|
|
|
|
* @var \RetailCrm\Response\ApiResponse $response
|
|
|
|
*/
|
2017-11-17 15:02:54 +03:00
|
|
|
$response = $client->request->integrationModulesEdit(
|
2017-06-22 00:55:08 +03:00
|
|
|
[
|
2017-11-17 15:02:54 +03:00
|
|
|
'name' => self::SERVICE_NAME,
|
|
|
|
'code' => self::SERVICE_CODE,
|
|
|
|
'clientId' => uniqid(),
|
2017-06-22 00:55:08 +03:00
|
|
|
'logo' => 'http://download.retailcrm.pro/logos/setup.svg',
|
|
|
|
'active' => 'true'
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response);
|
2017-11-17 15:02:54 +03:00
|
|
|
static::assertEquals($response->getStatusCode(), 200);
|
2017-06-22 00:55:08 +03:00
|
|
|
static::assertTrue($response->isSuccessful());
|
|
|
|
}
|
|
|
|
}
|