2023-12-22 14:59:06 +08:00
|
|
|
<?php
|
|
|
|
|
2024-01-03 18:02:57 +08:00
|
|
|
namespace Yansongda\Pay\Tests\Plugin\Alipay\V2\Pay\Face;
|
2023-12-22 14:59:06 +08:00
|
|
|
|
2024-01-11 21:45:27 +08:00
|
|
|
use Yansongda\Artful\Direction\ResponseDirection;
|
2024-01-03 18:02:57 +08:00
|
|
|
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Face\QueryPlugin;
|
2024-01-11 21:45:27 +08:00
|
|
|
use Yansongda\Artful\Rocket;
|
2023-12-22 14:59:06 +08:00
|
|
|
use Yansongda\Pay\Tests\TestCase;
|
|
|
|
|
|
|
|
class QueryPluginTest extends TestCase
|
|
|
|
{
|
|
|
|
protected QueryPlugin $plugin;
|
|
|
|
|
|
|
|
protected function setUp(): void
|
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
$this->plugin = new QueryPlugin();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testNormal()
|
|
|
|
{
|
|
|
|
$rocket = (new Rocket())
|
|
|
|
->setParams([]);
|
|
|
|
|
|
|
|
$result = $this->plugin->assembly($rocket, function ($rocket) { return $rocket; });
|
|
|
|
|
|
|
|
$payload = $result->getPayload()->toJson();
|
|
|
|
|
|
|
|
self::assertNotEquals(ResponseDirection::class, $result->getDirection());
|
|
|
|
self::assertStringContainsString('zoloz.authentication.customer.ftoken.query', $payload);
|
|
|
|
}
|
|
|
|
}
|