LogisticYDSyncTest.php 906 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace Tests\Services\LogisticYDService;
  3. use App\Jobs\LogisticYDSync;
  4. use App\OrderPackage;
  5. use App\Services\LogisticYDService;
  6. use Tests\TestCase;
  7. use App\LogisticYD;
  8. use App\Traits\TestMockSubServices;
  9. class LogisticYDSyncTest extends TestCase
  10. {
  11. use TestMockSubServices;
  12. /** @var LogisticYDService $service */
  13. public $service;
  14. private $data;
  15. private $amount=2;
  16. function setUp(): void
  17. {
  18. parent::setUp();
  19. $this->service = app('LogisticYDService');
  20. }
  21. public function testReturned()
  22. {
  23. $this->assertTrue(true);
  24. }
  25. function tearDown(): void
  26. {
  27. parent::tearDown();
  28. }
  29. /**
  30. * @test
  31. */
  32. public function sync_test()
  33. {
  34. LogisticYDSync::dispatch('4314543143889');
  35. $this->assertTrue(OrderPackage::query()->where('logistic_number','4314543143889')->first()->transfer_status);
  36. }
  37. }