| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace Tests\Services\StoreService;
- use App\OracleDOCASNHeader;
- use App\Services\StoreService;
- use Carbon\Carbon;
- use Illuminate\Support\Facades\DB;
- use Tests\TestCase;
- class UpdateStoreTest extends TestCase
- {
- /** @var StoreService $service */
- public $service;
- public $asnHeaders;
- public $stores;
- public function setUp(): void
- {
- parent::setUp(); // TODO: Change the autogenerated stub
- $dataInterval = intval(data_get(config('sync'), 'asn_sync.interval')) * 60 + 5;
- $startDate = \Illuminate\Support\Carbon::now()->subSeconds($dataInterval);
- $this->service=app(StoreService::class);
- $this->asnHeaders=OracleDOCASNHeader::query()
- ->with(['asnType', 'asnStatus', 'asnDetails' => function ($query) {
- $query->with(['lineStatus', 'qualityStatus','basSku']);
- }])
- ->where('EditTime', '>=', $startDate)
- ->whereColumn('EditTime', '<>', 'addTime')
- ->get();
- }
- public function testUpdateStore(){
- if (!$this->asnHeaders) {
- $this->assertNull($this->asnHeaders);
- }else{
- //$this->assertEquals($this->service->updateStore($this->asnHeaders),1);
- }
- }
- public function tearDown(): void
- {
- parent::tearDown(); // TODO: Change the autogenerated stub
- }
- }
|