/** * clean up statements * * @return void */ public function cleanUpProcessAfterIndexing() { // enable keys again if this was the first indexing process if ($countIndex == 0) { $GLOBALS['TYPO3_DB']->sql_query('ALTER TABLE tx_kesearch_index ENABLE KEYS'); } $GLOBALS['TYPO3_DB']->sql_query('DEALLOCATE PREPARE searchStmt'); $GLOBALS['TYPO3_DB']->sql_query('DEALLOCATE PREPARE updateStmt'); $GLOBALS['TYPO3_DB']->sql_query('DEALLOCATE PREPARE insertStmt'); // remove all entries from ke_search registry $this->registry->removeAllByNamespace('tx_kesearch'); }
/** * @test */ public function removeAllByNamespaceReallyRemovesAllEntriesOfTheSpecifiedNamespaceFromTheDatabase() { $GLOBALS['TYPO3_DB']->expects($this->once())->method('exec_DELETEquery')->with('sys_registry', 'entry_namespace = \'tx_phpunit\''); $this->registry->removeAllByNamespace('tx_phpunit'); }