<?php

namespace Tests\Services\LogisticYDService;
use App\Jobs\LogisticYDSync;
use App\OrderPackage;
use App\Services\LogisticYDService;
use Tests\TestCase;
use App\LogisticYD;
use App\Traits\TestMockSubServices;

class LogisticYDSyncTest extends TestCase
{
    use TestMockSubServices;
    /** @var LogisticYDService $service */
    public $service;
    private $data;
    private $amount=2;
    function setUp(): void
    {
        parent::setUp();
        $this->service = app('LogisticYDService');
    }

    public function testReturned()
    {
        $this->assertTrue(true);
    }

    function tearDown(): void
    {
        parent::tearDown();
    }

    /**
     * @test
     */
    public function sync_test()
    {
        LogisticYDSync::dispatch('4314543143889');
        $this->assertTrue(OrderPackage::query()->where('logistic_number','4314543143889')->first()->transfer_status);
    }
}
