File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,19 +81,16 @@ public function setUp(): void
8181 self ::login ('glpi ' , 'glpi ' , true );
8282 }
8383
84-
8584 /**
86- * Execute plugin installation in the context if tests
85+ * Helper method to wipe all plugin data
86+ *
87+ * @return void
8788 */
88- protected function executeInstallation ()
89- {
89+ protected function wipePlugin () {
9090 /** @var DBmysql */
9191 global $ DB ;
9292
9393 $ plugin_name = TEST_PLUGIN_NAME ;
94-
95- $ this ->assertTrue ($ DB ->connected );
96-
9794 //Drop plugin configuration if exists
9895 $ config = new Config ();
9996 $ config ->deleteByCriteria (['context ' => $ plugin_name ]);
@@ -103,6 +100,20 @@ protected function executeInstallation()
103100 foreach ($ result as $ data ) {
104101 $ DB ->dropTable ($ data ['TABLE_NAME ' ]);
105102 }
103+ }
104+
105+ /**
106+ * Execute plugin installation in the context if tests
107+ */
108+ protected function executeInstallation ()
109+ {
110+ /** @var DBmysql */
111+ global $ DB ;
112+
113+ $ plugin_name = TEST_PLUGIN_NAME ;
114+
115+ $ this ->assertTrue ($ DB ->connected );
116+ $ this ->wipePlugin ();
106117
107118 // Reset logs
108119 $ this ->resetGLPILogs ();
You can’t perform that action at this time.
0 commit comments