QueryTest.php 807 B

12345678910111213141516171819202122232425262728293031323334353637
  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. if ($response->status==0){
  26. $this->assertNotEmpty($response->result);
  27. $this->assertEquals($response->result->number,'4280174475389');
  28. }
  29. }
  30. }