@@ -189,6 +189,13 @@ public function testCheckGitRevisionPacksFolder(): void
189189 mkdir ($ this ->testDir . '.git/objects/pack ' , 0777 , true );//default = 0777, recursive mode
190190
191191 $ commit = $ this ->object ->checkGitRevision ();
192+ // Delete the dataset
193+ rmdir ($ this ->testDir . '.git/objects/pack ' );
194+ rmdir ($ this ->testDir . '.git/objects ' );
195+ unlink ($ this ->testDir . '.git/packed-refs ' );
196+ unlink ($ this ->testDir . '.git/HEAD ' );
197+ unlink ($ this ->testDir . '.git/config ' );
198+ rmdir ($ this ->testDir . '.git ' );
192199
193200 if (
194201 $ commit === null
@@ -212,13 +219,6 @@ public function testCheckGitRevisionPacksFolder(): void
212219 $ this ->assertSame ('phpMyAdmin bot ' , $ commit ['committer ' ]['name ' ]);
213220 $ this ->assertSame ('bot@phpmyadmin.net ' , $ commit ['committer ' ]['email ' ]);
214221 $ this ->assertSame ('2023-05-14T00:19:49Z ' , $ commit ['committer ' ]['date ' ]);
215-
216- rmdir ($ this ->testDir . '.git/objects/pack ' );
217- rmdir ($ this ->testDir . '.git/objects ' );
218- unlink ($ this ->testDir . '.git/packed-refs ' );
219- unlink ($ this ->testDir . '.git/HEAD ' );
220- unlink ($ this ->testDir . '.git/config ' );
221- rmdir ($ this ->testDir . '.git ' );
222222 }
223223
224224 /**
@@ -296,6 +296,14 @@ public function testCheckGitRevisionPacksFile(): void
296296 );
297297
298298 $ commit = $ this ->object ->checkGitRevision ();
299+ // Delete the dataset
300+ unlink ($ this ->testDir . '.git/objects/info/packs ' );
301+ rmdir ($ this ->testDir . '.git/objects/info ' );
302+ rmdir ($ this ->testDir . '.git/objects ' );
303+ unlink ($ this ->testDir . '.git/packed-refs ' );
304+ unlink ($ this ->testDir . '.git/HEAD ' );
305+ unlink ($ this ->testDir . '.git/config ' );
306+ rmdir ($ this ->testDir . '.git ' );
299307
300308 if (
301309 $ commit === null
@@ -319,14 +327,6 @@ public function testCheckGitRevisionPacksFile(): void
319327 $ this ->assertSame ('phpMyAdmin bot ' , $ commit ['committer ' ]['name ' ]);
320328 $ this ->assertSame ('bot@phpmyadmin.net ' , $ commit ['committer ' ]['email ' ]);
321329 $ this ->assertSame ('2023-05-14T00:19:49Z ' , $ commit ['committer ' ]['date ' ]);
322-
323- unlink ($ this ->testDir . '.git/objects/info/packs ' );
324- rmdir ($ this ->testDir . '.git/objects/info ' );
325- rmdir ($ this ->testDir . '.git/objects ' );
326- unlink ($ this ->testDir . '.git/packed-refs ' );
327- unlink ($ this ->testDir . '.git/HEAD ' );
328- unlink ($ this ->testDir . '.git/config ' );
329- rmdir ($ this ->testDir . '.git ' );
330330 }
331331
332332 /**
0 commit comments