FormatTest.php 924 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Tests\Services\LogisticYTOService;
  3. use App\Services\LogisticYDService;
  4. use App\Services\LogisticYTOService;
  5. use Tests\TestCase;
  6. use App\LogisticYD;
  7. use App\Traits\TestMockSubServices;
  8. class FormatTest extends TestCase
  9. {
  10. use TestMockSubServices;
  11. /** @var LogisticYTOService $service */
  12. public $service;
  13. private $data;
  14. private $amount = 2;
  15. function setUp(): void
  16. {
  17. parent::setUp();
  18. $this->service = app('LogisticYTOService');
  19. }
  20. /**
  21. * @test
  22. */
  23. public function format_test()
  24. {
  25. $response=$this->service->query('YT5555835896970');
  26. if (is_object($response))$this->assertEquals('1001', $response->code);
  27. if (!is_object($response)){
  28. $this->assertNotEmpty($response);
  29. $result = $this->service->format($response,'YT5555835896970');
  30. $this->assertNotEmpty($result);
  31. }
  32. }
  33. }