TestOrder.php 693 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace think;
  3. use PHPUnit\Framework\TestCase;
  4. define('BASE_ROOT_PATH',str_replace('/tests','',dirname(__FILE__)));
  5. define('BASE_PATH',BASE_ROOT_PATH . '/tests');
  6. define('APP_ID','tests');
  7. define('BASE_DATA_PATH',BASE_ROOT_PATH . '/data');
  8. require_once(BASE_ROOT_PATH . '/thinkphp/base.php');
  9. class TestOrder extends TestCase
  10. {
  11. protected $baseUrl = 'http://localhost';
  12. public static function setUpBeforeClass() : void
  13. {
  14. App::getInstance()->path(BASE_ROOT_PATH . '/application/')->initialize();
  15. }
  16. public function testCheckOrder()
  17. {
  18. $resp = http_request('http://host.docker.internal:8080/CheckOrder',['order_sn' => '123456'],'GET');
  19. }
  20. }