/** * */ protected function removeHook() { $moduleHooksFile = $this->moduleDirectory . '/install/registeredHooks.json'; if (file_exists($moduleHooksFile)) { $moduleHooks = json_decode(file_get_contents($moduleHooksFile), true); foreach ($moduleHooks as $moduleHook) { Hook::unregister($this->moduleId, $moduleHook['name'], $moduleHook['moduleHook']); } } }
public function testUnregister() { Hook::unregister(6, 'displayLeftMenu', 'displayBookmarkedViews'); $this->assertEquals(0, $this->getConnection()->getRowCount('cfg_modules_hooks')); }