| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- declare(strict_types=1);
- namespace SixShop\WechatPay;
- use PHPUnit\Framework\TestCase;
- use SixShop\WechatPay\Trait\ApiTrait;
- use SixShop\WechatPay\Trait\MiniAppTrait;
- use WeChatPay\BuilderChainable;
- class WechatPayBuilderTest extends TestCase
- {
- use MiniAppTrait;
- use ApiTrait;
- public function testCreate()
- {
- $result = \SixShop\WechatPay\Facade\WechatPayBuilder::getBuilderChainable();
- $this->assertInstanceOf(BuilderChainable::class, $result);
- }
- public function testOpSpecialOrder()
- {
- $this->expectException(\InvalidArgumentException::class);
- $this->expectExceptionCode(268546002);
- $result = $this->opSpecialOrder('errororderid', 2);
- }
- public function testDomesticRefunds()
- {
- $result = $this->domesticRefunds('20250904133148020905', '20250904133148020905', 0.01);
- $this->assertObjectHasProperty('amount', $result);
- dump($result);
- }
- public function testQueryByOutTradeNo()
- {
- $result = $this->queryByOutTradeNo('20250904133148020905');
- dump($result);
- }
- }
|