QueryTest.php 803 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Tests\Services\LogisticAliJiSuApiService;
  3. use App\OrderPackage;
  4. use App\Services\LogisticYDService;
  5. use App\Services\LogisticYTOService;
  6. use Illuminate\Support\Facades\Http;
  7. use Tests\TestCase;
  8. class QueryTest extends TestCase
  9. {
  10. /**
  11. * @var LogisticYTOService $service
  12. */
  13. private $service;
  14. protected function setUp(): void
  15. {
  16. parent::setUp(); // TODO: Change the autogenerated stub
  17. $this->service = app('LogisticAliJiSuApiService');
  18. }
  19. /**
  20. * @test
  21. */
  22. public function prod_test()
  23. {
  24. $response = $this->service->query('4280174475389');
  25. dd($response);
  26. if (is_object($response))$this->assertEquals('1001', $response->code);
  27. if (!is_object($response))$this->assertNotEmpty($response);
  28. }
  29. }