2016-11-28 14:38:03 +03:00
|
|
|
<?php
|
2017-06-12 23:58:56 +03:00
|
|
|
|
2016-11-28 14:38:03 +03:00
|
|
|
/**
|
|
|
|
* PHP version 5.3
|
|
|
|
*
|
|
|
|
* API client marketplace test class
|
|
|
|
*
|
|
|
|
* @category RetailCrm
|
|
|
|
* @package RetailCrm
|
|
|
|
* @author RetailCrm <integration@retailcrm.ru>
|
|
|
|
* @license https://opensource.org/licenses/MIT MIT License
|
2017-06-12 23:58:56 +03:00
|
|
|
* @link http://www.retailcrm.ru/docs/Developers/ApiVersion5
|
2016-11-28 14:38:03 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace RetailCrm\Tests;
|
|
|
|
|
|
|
|
use RetailCrm\Test\TestCase;
|
|
|
|
|
2017-06-12 23:58:56 +03:00
|
|
|
/**
|
|
|
|
* Class ApiClientMarketplaceTest
|
|
|
|
*
|
|
|
|
* @package RetailCrm\Tests
|
|
|
|
*/
|
2016-11-28 14:38:03 +03:00
|
|
|
class ApiClientMarketplaceTest extends TestCase
|
|
|
|
{
|
|
|
|
const SNAME = 'Marketplace integration';
|
|
|
|
const SCODE = 'integration';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @group marketplace
|
|
|
|
*/
|
|
|
|
public function testConfigurationEdit()
|
|
|
|
{
|
|
|
|
$client = static::getApiClient();
|
|
|
|
|
|
|
|
$response = $client->marketplaceSettingsEdit(
|
|
|
|
array(
|
|
|
|
'name' => self::SNAME,
|
|
|
|
'code' => self::SCODE,
|
|
|
|
'logo' => 'http://download.retailcrm.pro/logos/setup.svg',
|
|
|
|
'active' => 'true'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2017-06-12 23:58:56 +03:00
|
|
|
static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response);
|
|
|
|
static::assertTrue(in_array($response->getStatusCode(), array(200, 201)));
|
|
|
|
static::assertTrue($response->isSuccessful());
|
2016-11-28 14:38:03 +03:00
|
|
|
}
|
|
|
|
}
|