QueryTest.php 760 B

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