PutBinToStoreTest.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace Tests\Services\CacheShelfService;
  3. use App\MaterialBox;
  4. use App\Services\CacheShelfService;
  5. use App\Station;
  6. use App\StationCacheShelfGrid;
  7. use Tests\TestCase;
  8. class PutBinToStoreTest extends TestCase
  9. {
  10. /** @var CacheShelfService $service */
  11. protected $service;
  12. protected $data =[];
  13. protected function setup(): void
  14. {
  15. parent::setup(); // todo: change the autogenerated stub
  16. $this->service = app(CacheShelfService::class);
  17. $this->data['station'] = factory(Station::class)->create(['name' => 'test', 'code'=> 'test']);
  18. $this->data['materialBox'] = factory(MaterialBox::class)->create();
  19. $this->data['stationCacheShelfGrid'] = factory(StationCacheShelfGrid::class)->create([
  20. 'station_id'=>$this->data['station']['id'],
  21. 'material_box_id'=>$this->data['materialBox']['id'],
  22. 'status' => 1
  23. ]);
  24. }
  25. public function testPutBinToStore()
  26. {
  27. // public function putBinToStore(Station $station,MaterialBox $materialBox,StationCacheShelfGrid $grid): bool
  28. $this->service->putBinToStore($this->data['station'],$this->data['materialBox'],$this->data['stationCacheShelfGrid']);
  29. }
  30. protected function tearDown(): void
  31. {
  32. parent::tearDown(); // TODO: Change the autogenerated stub
  33. }
  34. }