45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use Illuminate\Support\Str;
|
|
use LDC\LDCCRM\CrmApiV2;
|
|
use LDC\LDCCRM\Enums\ArcadiaOrderType;
|
|
use LDC\LDCCRM\Models\ArcadiaMailDefault;
|
|
use LDC\LDCCRM\Models\ArcadiaMailGame;
|
|
|
|
class CrmClientV2ArcadiaTest extends CrmClientTester
|
|
{
|
|
public function testArcadiaSendOrderDefault()
|
|
{
|
|
$api = new CrmApiV2();
|
|
$customer = $api->getCustomerOrNew(static::$info->hashcode);
|
|
|
|
$arcadiaOrderMail = new ArcadiaMailDefault([
|
|
'operation' => 16,
|
|
'label_type_support' => 'Send Departaimants',
|
|
'order_date' => \date('Y/m/d H:i:s'),
|
|
'state_order' => ArcadiaOrderType::cb()->value,
|
|
'support_code' => 32,
|
|
'label_type_support' => 'Fond carte Aimanté',
|
|
'order_num' => 23,
|
|
'package_unit_weight' => 200,
|
|
]);
|
|
$this->assertTrue($arcadiaOrderMail->send($customer));
|
|
}
|
|
|
|
public function testArcadiaSendOrderGame()
|
|
{
|
|
$api = new CrmApiV2();
|
|
$customer = $api->getCustomerOrNew(static::$info->hashcode);
|
|
$arcadiaOrderMail = new ArcadiaMailGame([
|
|
'operation' => 16,
|
|
'order_date' => date('Y/m/d H:i:s'),
|
|
'support_code' => 32,
|
|
'label_type_support' => 'Jeux Reghalal',
|
|
'code_unique' => (string)Str::uuid(),
|
|
'code_on_pack' => 'anystring'
|
|
]);
|
|
$this->assertTrue($arcadiaOrderMail->send($customer));
|
|
}
|
|
}
|