TestSearch.php 800 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2016/10/7
  6. * Time: 下午1:03
  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/search/searcher.php');
  11. require_once(BASE_ROOT_PATH . '/helper/search/server.php');
  12. require_once(BASE_ROOT_PATH . '/helper/search/processor.php');
  13. class TestSearch extends PHPUnit_Framework_TestCase
  14. {
  15. public static function setUpBeforeClass()
  16. {
  17. Base::run_util();
  18. }
  19. public function testInit()
  20. {
  21. $dict = new search\goods_dict();
  22. $dict->init();
  23. }
  24. public function testSearcher()
  25. {
  26. $searcher = new search\searcher();
  27. $result = $searcher->get_word('相宜本草红');
  28. }
  29. }