DBTest.php 658 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2017/1/31
  6. * Time: 上午11:28
  7. */
  8. define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
  9. require_once(BASE_ROOT_PATH . '/fooder.php');
  10. class DBTest extends PHPUnit_Framework_TestCase
  11. {
  12. public static function setUpBeforeClass()
  13. {
  14. Base::run_util();
  15. }
  16. public function testQuery()
  17. {
  18. $items = Db::getAll('select * from lrlz_member');
  19. }
  20. public static function tearDownAfterClass()
  21. {
  22. }
  23. public function testConnection()
  24. {
  25. $mysql = @new mysqli('192.168.1.103', 'root', '55668899', 'pandashop', '3306');
  26. }
  27. }