| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace Tests\Services\LogisticYTOService;
- use App\Services\LogisticYDService;
- use App\Services\LogisticYTOService;
- use Tests\TestCase;
- use App\LogisticYD;
- use App\Traits\TestMockSubServices;
- class FormatTest extends TestCase
- {
- use TestMockSubServices;
- /** @var LogisticYTOService $service */
- public $service;
- private $data;
- private $amount = 2;
- function setUp(): void
- {
- parent::setUp();
- $this->service = app('LogisticYTOService');
- }
- /**
- * @test
- */
- public function format_test()
- {
- $response=$this->service->query('YT5555835896970');
- if (is_object($response))$this->assertEquals('1001', $response->code);
- if (!is_object($response)){
- $this->assertNotEmpty($response);
- $result = $this->service->format($response,'YT5555835896970');
- $this->assertNotEmpty($result);
- }
- }
- }
|