TestLXOrder.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. declare(strict_types=0);
  3. define('APP_ID', 'test');
  4. define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
  5. require_once(BASE_ROOT_PATH . '/global.php');
  6. require_once(BASE_CORE_PATH . '/lrlz.php');
  7. require_once(BASE_ROOT_PATH . '/fooder.php');
  8. use PHPUnit\Framework\TestCase;
  9. class TestLXOrder extends TestCase
  10. {
  11. public static function setUpBeforeClass(): void
  12. {
  13. Base::run_util();
  14. }
  15. private $mStoreID;
  16. public function __construct(?string $name = null, array $data = [], $dataName = '')
  17. {
  18. parent::__construct($name, $data, $dataName);
  19. $this->mStoreID = 10;
  20. }
  21. public function testDown()
  22. {
  23. $vr_order = Model('vr_order');
  24. $orders = $vr_order->getOrderList(['store_id' => $this->mStoreID,'order_state' => ORDER_STATE_PAY]);
  25. if(empty($orders)) {
  26. Log::record("没有新订单",Log::DEBUG);
  27. return;
  28. }
  29. $order_ids = [];
  30. foreach ($orders as $order) {
  31. $order_ids[] = $order['order_id'];
  32. }
  33. $refill_order = Model('refill_order');
  34. // $refills = $refill_order->get
  35. }
  36. public function testUpSuccess()
  37. {
  38. }
  39. public function testUpFail()
  40. {
  41. }
  42. }