QueryTest.php 772 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace LogisticYDService;
  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('LogisticYDService');
  17. }
  18. /**
  19. * @test
  20. */
  21. public function queryTest()
  22. {
  23. $this->service->query('340987657890876');
  24. }
  25. /**
  26. * @test
  27. */
  28. public function prod_test()
  29. {
  30. $response = $this->service->query('4314519335027');
  31. dump($response);
  32. $this->assertEquals('0000', $response->code);
  33. }
  34. }