TestAuthor.php 975 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2017/4/26
  6. * Time: 上午11:55
  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/third_author/wxauthor.php');
  11. require_once (BASE_ROOT_PATH . '/helper/login_helper.php');
  12. class TestAuthor extends PHPUnit_Framework_TestCase
  13. {
  14. public static function setUpBeforeClass()
  15. {
  16. Base::run_util();
  17. }
  18. public function testWxauthor()
  19. {
  20. $author = new thrid_author\wxauthor();
  21. $author->enter();
  22. }
  23. public function testOnbind()
  24. {
  25. login_helper::onBinded('18911779278','3568');
  26. }
  27. public function testOrigin()
  28. {
  29. $val = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2 like Mac OS X) AppleWebKit/602.3.12 (KHTML, like Gecko) Mobile/14C92 MicroMessenger/6.5.7 NetType/WIFI Language/zh_CN';
  30. $pos = strpos($val,"MicroMessenger");
  31. }
  32. }