| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace Tests\Services\CacheShelfService;
- use App\MaterialBox;
- use App\Services\CacheShelfService;
- use App\Station;
- use App\StationCacheShelfGrid;
- use Tests\TestCase;
- class PutBinToStoreTest extends TestCase
- {
- /** @var CacheShelfService $service */
- protected $service;
- protected $data =[];
- protected function setup(): void
- {
- parent::setup(); // todo: change the autogenerated stub
- $this->service = app(CacheShelfService::class);
- $this->data['station'] = factory(Station::class)->create(['name' => 'test', 'code'=> 'test']);
- $this->data['materialBox'] = factory(MaterialBox::class)->create();
- $this->data['stationCacheShelfGrid'] = factory(StationCacheShelfGrid::class)->create([
- 'station_id'=>$this->data['station']['id'],
- 'material_box_id'=>$this->data['materialBox']['id'],
- 'status' => 1
- ]);
- }
- public function testPutBinToStore()
- {
- // public function putBinToStore(Station $station,MaterialBox $materialBox,StationCacheShelfGrid $grid): bool
- $this->service->putBinToStore($this->data['station'],$this->data['materialBox'],$this->data['stationCacheShelfGrid']);
- }
- protected function tearDown(): void
- {
- parent::tearDown(); // TODO: Change the autogenerated stub
- }
- }
|