pay/tests/Plugin/Alipay/V2/Pay/Face/QueryPluginTest.php

34 lines
868 B
PHP
Raw Normal View History

<?php
namespace Yansongda\Pay\Tests\Plugin\Alipay\V2\Pay\Face;
use Yansongda\Artful\Direction\ResponseDirection;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Face\QueryPlugin;
use Yansongda\Artful\Rocket;
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);
}
}