<?php



require __DIR__.'/tests/OrderMachine/OrderMachineBookRulesTest.php';
class ReproduceTest extends \tests\OrderMachine\OrderMachineBookRulesTest {
 public function testSoldOutConfirmation() {
  $this->setUp();
  try {
   \think\Db::name('recipes')->where('restaurant_id',1)->update(['limit_num'=>-1]);
   $method=new ReflectionMethod(\app\api\service\OrderMachineConfirm::class,'getDishesConfirmList');
   $method->setAccessible(true);
   $this->expectException(\think\Exception::class);
   $result=$method->invoke(new \app\api\service\OrderMachineConfirm(),1,date('Y-m-d'),2,['dish-enabled'=>['uuid'=>'dish-enabled','number'=>1]]);
   echo json_encode($result,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT),PHP_EOL;
  } finally { $this->tearDown(); }
 }
}
