Index: tests/Zend/Search/Lucene/LuceneTest.php =================================================================== --- tests/Zend/Search/Lucene/LuceneTest.php (revision 24790) +++ tests/Zend/Search/Lucene/LuceneTest.php (working copy) @@ -61,13 +61,16 @@ closedir($dir); } + public function setUp() + { + $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); + } + public function testCreate() { $index = Zend_Search_Lucene::create(dirname(__FILE__) . '/_index/_files'); $this->assertTrue($index instanceof Zend_Search_Lucene_Interface); unset($index); - - $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); } public function testOpen() @@ -319,8 +322,6 @@ $index1 = Zend_Search_Lucene::open(dirname(__FILE__) . '/_index/_files'); $this->assertTrue($index1 instanceof Zend_Search_Lucene_Interface); unset($index1); - - $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); } public function testOptimize() @@ -378,8 +379,6 @@ $hits = $index2->find('submitting'); $this->assertEquals(count($hits), 3); unset($index2); - - $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); } public function testTerms() @@ -464,8 +463,6 @@ $index->closeTermsStream(); unset($index); - - $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); } public function testTermsStreamInterfaceSkipToTermsRetrievingOneTermsCase() @@ -489,8 +486,6 @@ $index->closeTermsStream(); unset($index); - - $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); } public function testTermsStreamInterfaceSkipToTermsRetrievingTwoTermsCase() @@ -514,8 +509,6 @@ $index->closeTermsStream(); unset($index); - - $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); } /** @@ -546,8 +539,6 @@ $this->assertEquals(0, count($hits)); unset($index); - - $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); } /** @@ -566,8 +557,6 @@ $this->assertFalse($index->isDeleted(0)); unset($index); - - $this->_clearDirectory(dirname(__FILE__) . '/_index/_files'); } }