systemTest.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 16/8/8
  6. * Time: 下午11:16
  7. */
  8. define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
  9. require_once(BASE_ROOT_PATH . '/fooder.php');
  10. class systemTest extends PHPUnit_Framework_TestCase
  11. {
  12. public static function setUpBeforeClass()
  13. {
  14. Base::run_util();
  15. }
  16. public function testAreas()
  17. {
  18. $items = Model('area')->field('*')->order('area_id')->limit(false)->select();
  19. foreach($items as $item) {
  20. $val['aid'] = intval($item['area_id']);
  21. $val['n'] = $item['area_name'];
  22. $val['pid'] = intval($item['area_parent_id']);
  23. $val['d'] = intval($item['area_deep']);
  24. $areas[] = $val;
  25. }
  26. $txt = json_encode($areas,JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
  27. }
  28. public function testMobile()
  29. {
  30. $x = intval('13911129867');
  31. if($x == '13911129867') {
  32. echo "==";
  33. }
  34. }
  35. public function testMobiles()
  36. {
  37. $mobiles = "13911129867,18911779278,13681651248,18262273057,13813416101,18961950030,15000321164";
  38. $kv = preg_split('/,/',$mobiles);
  39. }
  40. }