QueryTest.php 840 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. $this->assertTrue(true);
  30. }
  31. }