MMSServiceTest.php 905 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare(strict_types=1);
  3. namespace SixShop\Lakala\Service;
  4. use PHPUnit\Framework\Attributes\Test;
  5. use PHPUnit\Framework\TestCase;
  6. use SixShop\Lakala\Enum\UploadFileTypeEnum;
  7. use SixShop\Payment\Enum\NumberBizEnum;
  8. class MMSServiceTest extends TestCase
  9. {
  10. private MMSService $mmsService;
  11. protected function setUp(): void
  12. {
  13. $this->mmsService = app(MMSService::class);
  14. }
  15. #[Test]
  16. public function cardBin()
  17. {
  18. $ret = $this->mmsService->cardBin(generate_number(NumberBizEnum::WITHDRAWAL, 5), '16227003321580073323');
  19. dump($ret);
  20. }
  21. #[Test]
  22. public function uploadFile()
  23. {
  24. $this->mmsService->uploadFile(
  25. generate_number(NumberBizEnum::WITHDRAWAL, 5),
  26. UploadFileTypeEnum::MERCHANT_PHOTO,
  27. 'pdf',
  28. 'https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png'
  29. );
  30. }
  31. }