TestQRcode.php 799 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2017/5/20
  6. * Time: 下午4:09
  7. */
  8. define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
  9. require_once(BASE_ROOT_PATH . '/fooder.php');
  10. require_once(BASE_ROOT_PATH . '/helper/util_helper.php');
  11. class TestQRcode extends PHPUnit_Framework_TestCase
  12. {
  13. public function testPgenA()
  14. {
  15. for ($i = 0; $i < 1000;$i++) {
  16. $save_path = BASE_UPLOAD_PATH . DS.ATTACH_MQRCODE.DS . "{$i}.png";
  17. util::qrcode("http://www.baidu.com","{$i}.png");
  18. }
  19. }
  20. public function testPgenB()
  21. {
  22. for ($i = 1000; $i < 2000;$i++) {
  23. $save_path = BASE_UPLOAD_PATH . DS.ATTACH_MQRCODE.DS . "{$i}.png";
  24. util::qrcode("http://www.baidu.com","{$i}.png");
  25. }
  26. }
  27. }