TestKdniao.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: lionared
  5. * Date: 2018/7/31
  6. * Time: 上午10:27
  7. */
  8. defined('BASE_ROOT_PATH') or define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
  9. require_once(BASE_ROOT_PATH . '/fooder.php');
  10. require_once(BASE_ROOT_PATH . '/helper/kdn_helper.php');
  11. class TestKdniao extends PHPUnit_Framework_TestCase
  12. {
  13. public static function setUpBeforeClass()
  14. {
  15. Base::run_util();
  16. }
  17. public function testQuery()
  18. {
  19. //$order_sn = "9000000002470048";
  20. //$e_code = "YTO";
  21. //$logisticCode = "886670260037510426";
  22. //$order_sn = "9000000002456344";
  23. //$order_sn = PHP_INT_MAX >> 32;
  24. $e_code = "ZTO";
  25. $logisticCode = "457209987858";
  26. $ret = kdn_helper::query($e_code, $logisticCode);
  27. var_dump($ret);
  28. }
  29. public function testSubscribe()
  30. {
  31. $order_sn = "9000000002456344";
  32. $e_code = "ZTO";
  33. $logisticCode = "457209987858";
  34. $subs = kdn_helper::req_subscribe($e_code, $logisticCode, $order_sn);
  35. var_dump($subs);
  36. }
  37. }