TempMarkBinProcessedTest.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. namespace Tests\Services\ForeignHaiRoboticsService;
  3. use App\Batch;
  4. use App\MaterialBox;
  5. use App\Order;
  6. use App\OrderCommodity;
  7. use App\Services\BatchService;
  8. use App\Services\ForeignHaiRoboticsService;
  9. use App\Services\StationService;
  10. use App\Services\StationTaskBatchService;
  11. use App\Station;
  12. use App\StationRuleBatch;
  13. use App\StationTask;
  14. use App\StationTaskBatch;
  15. use App\StationTaskCommodity;
  16. use App\StationTaskMaterialBox;
  17. use Tests\TestCase;
  18. use App\Traits\TestMockSubServices;
  19. class MarkBinProcessedTest extends TestCase
  20. {
  21. use TestMockSubServices;
  22. /** @var ForeignHaiRoboticsService $service */
  23. public $service;
  24. private $data;
  25. private $batchAmount = 1;
  26. private $orderAmount = 2;
  27. private $orderCommodityAmount = 4;
  28. function setUp(): void
  29. {
  30. parent::setUp();
  31. $this->service = $this->subMock([
  32. 'class' => ForeignHaiRoboticsService::class,
  33. 'methods' => [
  34. 'putBinToStore' => true,
  35. ],
  36. 'subServices' => [
  37. [
  38. 'serviceName' => 'stationService',
  39. 'class' => StationService::class,
  40. 'methods' => [
  41. // 'broadcastBinMonitor' => true,
  42. ],
  43. ],
  44. ]
  45. ]);
  46. }
  47. public function testMarkBinProcessed()
  48. {
  49. $this->service->markBinProcessed(
  50. '',
  51. "8b839c28-f2e3-3d56-b34a-d9ac4fd81fa2",
  52. true,
  53. '',
  54. '',
  55. true);
  56. $this->assertTrue(true);
  57. }
  58. public function testMarkBinProcessed2()
  59. {
  60. $this->service->markBinProcessed(
  61. '',
  62. "8c2ae097-dad7-314c-b586-2d0eb2709b62",
  63. true,
  64. '',
  65. '',
  66. true);
  67. $this->assertTrue(true);
  68. }
  69. public function testTaskUpdate()
  70. {
  71. $this->service->taskUpdate(
  72. '1739',
  73. 0,
  74. 0,
  75. "8b839c28-f2e3-3d56-b34a-d9ac4fd81fa2"
  76. );
  77. $this->assertTrue(true);
  78. }
  79. public function testTaskUpdate2()
  80. {
  81. $this->service->taskUpdate(
  82. '1738',
  83. 0,
  84. 0,
  85. "8c2ae097-dad7-314c-b586-2d0eb2709b62"
  86. );
  87. $this->assertTrue(true);
  88. }
  89. public function testTaskUpdate3()
  90. {
  91. $this->service->taskUpdate(
  92. '1737',
  93. 0,
  94. 0,
  95. "fa61ad33-6598-339b-9a32-a73a4720b46b"
  96. );
  97. $this->assertTrue(true);
  98. }
  99. public function testTaskUpdate4()
  100. {
  101. $this->service->taskUpdate(
  102. '1736',
  103. 0,
  104. 0,
  105. "03c0bde8-b5d7-393d-918e-383d38a1efe9"
  106. );
  107. $this->assertTrue(true);
  108. }
  109. function tearDown(): void
  110. {
  111. parent::tearDown();
  112. }
  113. }