InventoryAccountService_GetTest.php 690 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Tests\Inventory\Services\InventoryAccountService;
  3. use App\InventoryAccount;
  4. use App\Services\InventoryAccountService;
  5. use Tests\TestCase;
  6. class InventoryAccountService_GetTest extends TestCase
  7. {
  8. public $inventories;
  9. public $inventorys;
  10. public $queryParam=[];
  11. function testGet(){
  12. $inventoryService=new InventoryAccountService();
  13. $this->inventories=$inventoryService->get($this->queryParam);
  14. $this->inventorys=InventoryAccount::with(['owner'])->orderBy('id','desc')->get();
  15. $this->assertEquals(count($this->inventorys),count($this->inventories));
  16. $this->assertEquals($this->inventorys,$this->inventories);
  17. }
  18. }