init
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\LingxingErp\Test\Unit\Model\Api;
|
||||
|
||||
use Esun\LingxingErp\Model\Api\Signer;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class SignerTest extends TestCase
|
||||
{
|
||||
public function testMatchesLingxingPhpSdkSerializationAndEncryption(): void
|
||||
{
|
||||
$parameters = [
|
||||
'z' => null,
|
||||
'items' => [['sku' => '测试/1', 'qty' => 2, 'drop' => null]],
|
||||
'empty' => '',
|
||||
'bool' => true,
|
||||
'access_token' => 'token',
|
||||
'app_key' => 'ak_test123456789',
|
||||
'timestamp' => 1720408272,
|
||||
];
|
||||
|
||||
self::assertSame(
|
||||
'mR8XKYkL8QUYDIJmM75XAl3JGPuuDvzjsyr6LZ5nWocwCpgLHg5dzZDMNuiTX/Va',
|
||||
(new Signer())->sign($parameters, 'ak_test123456789')
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user