| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace Tests\Services\CacheShelfService;
- use App\Services\CacheShelfService;
- use App\Station;
- use Tests\TestCase;
- class LightOnTest extends testcase
- {
- /** @var CacheShelfService $service */
- protected $service;
- protected $data = [];
- protected function setup(): void
- {
- parent::setUp();
- $this->service = app(CacheShelfService::class);
- $this->data['station'] = factory(Station::class)->create();
- }
- public function testLightOn()
- {
- $row = ''; // 从右到左
- $col = ''; // 从下到上
- $this->service->lightOn($this->data['station'],$row,$col);
- }
- protected function tearDown(): void
- {
- Station::query()->where('id',$this->data['station']['id'])->delete();
- parent::tearDown();
- }
- }
|