StationCacheLightOnTest.php 921 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Tests\Services\CacheShelfService;
  3. use App\Services\CacheShelfService;
  4. use Tests\TestCase;
  5. class StationCacheLightOnTest extends TestCase
  6. {
  7. /** @var CacheShelfService $service */
  8. protected $service;
  9. public $data = [];
  10. protected function setUp(): void
  11. {
  12. parent::setUp(); // TODO: Change the autogenerated stub
  13. $this->data['code'] = 'HAIB1-01-01'; // 修改此处可进行测试
  14. $this->data['materialCode'] = 'IDE0005665'; // 修改此处可进行测试
  15. $this->service = app(CacheShelfService::class);
  16. }
  17. public function testLightOn()
  18. {
  19. $body = $this->service->_stationCacheLightOn($this->data['code'], $this->data['materialCode']);
  20. $this->assertEquals($body->code, 200);
  21. }
  22. protected function tearDown(): void
  23. {
  24. parent::tearDown(); // TODO: Change the autogenerated stub
  25. }
  26. }