1
0
mirror of synced 2024-11-23 22:06:09 +03:00
api-client-php/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php

53 lines
1.3 KiB
PHP
Raw Normal View History

<?php
/**
* PHP version 5.4
*
* API client marketplace test class
*
* @category RetailCrm
* @package RetailCrm
* @author RetailCrm <integration@retailcrm.ru>
* @license https://opensource.org/licenses/MIT MIT License
* @link http://www.retailcrm.ru/docs/Developers/ApiVersion5
*/
namespace RetailCrm\Tests\Methods\Version5;
use RetailCrm\Test\TestCase;
/**
* Class ApiClientMarketplaceTest
*
* @package RetailCrm\Tests
*/
class ApiClientMarketplaceTest extends TestCase
{
2017-11-17 15:02:54 +03:00
const SERVICE_NAME = 'Marketplace integration v5';
const SERVICE_CODE = 'integration_v5';
/**
* @group marketplace_v5
*/
public function testConfigurationEdit()
{
2017-11-17 15:02:54 +03:00
$client = static::getApiClient();
2017-11-17 15:02:54 +03:00
$response = $client->request->integrationModulesEdit(
[
2017-11-17 15:02:54 +03:00
'name' => self::SERVICE_NAME,
'code' => self::SERVICE_CODE,
'clientId' => uniqid(),
'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);
static::assertTrue($response->isSuccessful());
}
2017-11-17 15:02:54 +03:00
}