1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8class Search_Lucene_BaseTest extends Search_Index_BaseTest 9{ 10 private $dir; 11 12 function setUp() 13 { 14 $this->dir = __DIR__ . '/test_index'; 15 $this->tearDown(); 16 17 $index = new Search_Lucene_Index($this->dir); 18 $this->populate($index); 19 $this->index = $index; 20 } 21 22 function tearDown() 23 { 24 if ($this->index) { 25 $this->index->destroy(); 26 } 27 } 28 29 protected function highlight($word) 30 { 31 return '<b style="color:black;background-color:#ff66ff">' . $word . '</b>'; 32 } 33} 34