first=factory(InventoryAccount::class)->create(); $this->second=factory(InventoryAccount::class)->create(); } function testSome(){ $this->queryParam=[ 'data'=>'"'.$this->first['id'].','.$this->second['id'].'"', ]; $inventoryService=new InventoryAccountService(); $this->inventories=$inventoryService->some($this->queryParam); $this->inventorys=InventoryAccount::query()->with(['owner'])->orderBy('id','DESC') ->whereIn('id',explode(',','"'.$this->first['id'].','.$this->second['id'].'"'))->get(); $this->assertEquals(count($this->inventorys),count($this->inventories)); $this->assertEquals($this->inventorys,$this->inventories); } function tearDown(): void { InventoryAccount::where('id',$this->first['id'])->forceDelete(); InventoryAccount::where('id',$this->second['id'])->forceDelete(); parent::tearDown(); // TODO: Change the autogenerated stub } }