This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -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')
);
}
}