service = app('StationRuleBatchService'); $this->batchService = app('BatchService'); $this->data['stationRuleBatches'] = factory(StationRuleBatch::class) ->create([]); $this->data['batches'] = factory(Batch::class,3)->create([ ]); } /** * @test */ public function getShopByCodeMap() { $shop = $this->service->getShopByCodeMap($this->data['map']); $this->assertNotNull($shop); $orderHeader = $this->data['orderHeader']; $owner = Owner::find($shop->first()->owner_id); $this->assertEquals($owner->code,$orderHeader['customerid']); $this->assertEquals($shop->first()->name,$orderHeader['issuepartyname']); } public function tearDown(): void { cache()->flush(); parent::tearDown(); // TODO: Change the autogenerated stub } }