mirror of
				https://github.com/phpbb/phpbb.git
				synced 2025-10-26 05:06:12 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
| *
 | |
| * This file is part of the phpBB Forum Software package.
 | |
| *
 | |
| * @copyright (c) phpBB Limited <https://www.phpbb.com>
 | |
| * @license GNU General Public License, version 2 (GPL-2.0)
 | |
| *
 | |
| * For full copyright and license information, please see
 | |
| * the docs/CREDITS.txt file.
 | |
| *
 | |
| */
 | |
| 
 | |
| require_once dirname(__FILE__) . '/common_test_case.php';
 | |
| 
 | |
| class phpbb_search_mysql_test extends phpbb_search_common_test_case
 | |
| {
 | |
| 	protected $db;
 | |
| 	protected $search;
 | |
| 
 | |
| 	public function getDataSet()
 | |
| 	{
 | |
| 		return $this->createXMLDataSet(dirname(__FILE__) . '/../fixtures/empty.xml');
 | |
| 	}
 | |
| 
 | |
| 	protected function setUp()
 | |
| 	{
 | |
| 		global $phpbb_root_path, $phpEx, $config, $user, $cache;
 | |
| 
 | |
| 		parent::setUp();
 | |
| 
 | |
| 		// dbal uses cache
 | |
| 		$cache = new phpbb_mock_cache();
 | |
| 
 | |
| 		//  set config values
 | |
| 		$config['fulltext_mysql_min_word_len'] = 4;
 | |
| 		$config['fulltext_mysql_max_word_len'] = 254;
 | |
| 
 | |
| 		$this->db = $this->new_dbal();
 | |
| 		$error = null;
 | |
| 		$class = self::get_search_wrapper('\phpbb\search\fulltext_mysql');
 | |
| 		$this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
 | |
| 	}
 | |
| }
 |