| 123456789101112131415161718192021222324 |
- <?php
- namespace Tests\Inventory\Services\InventoryService;
- use App\Inventory;
- use App\Services\InventoryService;
- use Tests\TestCase;
- class InventoryService_GetTest extends TestCase
- {
- public $inventories;
- public $inventorys;
- public $queryParam=[];
- function testGet(){
- $inventoryService=new InventoryService();
- $this->inventories=$inventoryService->get($this->queryParam);
- $this->inventorys=Inventory::with(['owner'])->orderBy('id','desc')->get();
- $this->assertEquals(count($this->inventorys),count($this->inventories));
- $this->assertEquals($this->inventorys,$this->inventories);
- }
- }
|