QueryTest.php 769 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Tests\Services\LogisticYTOService;
  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('LogisticYTOService');
  18. }
  19. /**
  20. * @test
  21. */
  22. public function prod_test()
  23. {
  24. $response = $this->service->query('YT5487281295636');
  25. if (is_object($response))$this->assertEquals('1001', $response->code);
  26. if (!is_object($response))$this->assertNotEmpty($response);
  27. }
  28. }