FormatTest.php 858 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Tests\Services\LogisticAliJiSuApiService;
  3. use App\Services\LogisticYDService;
  4. use App\Services\LogisticYTOService;
  5. use BeyondCode\DumpServer\DumpServerServiceProvider;
  6. use Tests\TestCase;
  7. use App\LogisticYD;
  8. use App\Traits\TestMockSubServices;
  9. class FormatTest extends TestCase
  10. {
  11. use TestMockSubServices;
  12. /** @var LogisticYTOService $service */
  13. public $service;
  14. private $data;
  15. private $amount = 2;
  16. function setUp(): void
  17. {
  18. parent::setUp();
  19. $this->service = app('LogisticAliJiSuApiService');
  20. }
  21. /**
  22. * @test
  23. */
  24. public function format_test()
  25. {
  26. $response=$this->service->query('9882714987042');
  27. if ($response && $response->status==0){
  28. $result = $this->service->format($response);
  29. $this->assertNotEmpty($result);
  30. }
  31. }
  32. }