TestRoom.php 826 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2017/12/14
  6. * Time: 下午4:59
  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/tcp_client.php');
  11. require_once(BASE_ROOT_PATH . '/helper/room/client.php');
  12. class TestRoom extends PHPUnit_Framework_TestCase
  13. {
  14. public static function setUpBeforeClass()
  15. {
  16. Base::run_util();
  17. }
  18. public function testCreateBargain()
  19. {
  20. room\room_client::instance()->create_bargain();
  21. }
  22. public function testCreateChat()
  23. {
  24. $user = 36490;
  25. $ret = room\room_client::instance()->create_chat($user);
  26. $room_id = $ret['room'];
  27. $retx = room\room_client::instance()->invite($room_id,36429);
  28. }
  29. }