TestCardKey.php 857 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. use PHPUnit\Framework\TestCase;
  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. require_once(BASE_HELPER_PATH . '/mcard/mcard.php');
  9. require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
  10. require_once(BASE_HELPER_PATH . '/util_helper.php');
  11. class TestCardKey extends TestCase
  12. {
  13. public static function setUpBeforeClass(): void
  14. {
  15. Base::run_util();
  16. }
  17. public function testGetUsable()
  18. {
  19. $amount = 1000;
  20. [$ret,$card] = mtopcard\cards_helper::reserve(mtopcard\OilCardPaper,1000,35268,'xxxyyyzzzkkkdj',mtopcard\PetroChinaCard,[0]);
  21. $card_no = $card->card_no();
  22. $card_key = $card->card_key();
  23. }
  24. }