@@ -187,52 +187,34 @@ public function testCheckGitRevisionPacksFolder(): void
187187 '# pack-refs with: peeled fully-peeled sorted ' . "\n" .
188188 'c1f2ff2eb0c3fda741f859913fd589379f4e4a8f refs/tags/4.3.10 ' . "\n" .
189189 '^6f2e60343b0a324c65f2d1411bf4bd03e114fb98 ' . "\n" .
190- '17bf8b7309919f8ac593d7c563b31472780ee83b refs/remotes/origin/master ' . "\n" ,
190+ '8d660283c5c88a04bac7a2b3aa9ad9eaff0fd05e refs/remotes/origin/master ' . "\n" ,
191191 );
192192 mkdir ($ this ->testDir . '.git/objects/pack ' , 0777 , true );//default = 0777, recursive mode
193193
194194 $ commit = $ this ->object ->checkGitRevision ();
195195
196196 if (
197197 $ commit === null
198- && ! isset ($ _SESSION ['PMA_VERSION_REMOTECOMMIT_17bf8b7309919f8ac593d7c563b31472780ee83b ' ])
198+ && ! isset ($ _SESSION ['PMA_VERSION_REMOTECOMMIT_8d660283c5c88a04bac7a2b3aa9ad9eaff0fd05e ' ])
199199 ) {
200200 $ this ->markTestSkipped ('Unable to get remote commit information. ' );
201201 }
202202
203203 $ this ->assertIsArray ($ commit );
204- $ this ->assertArrayHasKey ('hash ' , $ commit );
205- $ this ->assertEquals ('17bf8b7309919f8ac593d7c563b31472780ee83b ' , $ commit ['hash ' ]);
206-
207- $ this ->assertArrayHasKey ('branch ' , $ commit );
208- $ this ->assertEquals ('master ' , $ commit ['branch ' ]);
209-
210- $ this ->assertArrayHasKey ('message ' , $ commit );
211- $ this ->assertIsString ($ commit ['message ' ]);
212-
213- $ this ->assertArrayHasKey ('is_remote_commit ' , $ commit );
214- $ this ->assertIsBool ($ commit ['is_remote_commit ' ]);
215-
216- $ this ->assertArrayHasKey ('is_remote_branch ' , $ commit );
217- $ this ->assertIsBool ($ commit ['is_remote_branch ' ]);
218-
219- $ this ->assertArrayHasKey ('author ' , $ commit );
220- $ this ->assertIsArray ($ commit ['author ' ]);
221- $ this ->assertArrayHasKey ('name ' , $ commit ['author ' ]);
222- $ this ->assertArrayHasKey ('email ' , $ commit ['author ' ]);
223- $ this ->assertArrayHasKey ('date ' , $ commit ['author ' ]);
224- $ this ->assertIsString ($ commit ['author ' ]['name ' ]);
225- $ this ->assertIsString ($ commit ['author ' ]['email ' ]);
226- $ this ->assertIsString ($ commit ['author ' ]['date ' ]);
227-
228- $ this ->assertArrayHasKey ('committer ' , $ commit );
229- $ this ->assertIsArray ($ commit ['committer ' ]);
230- $ this ->assertArrayHasKey ('name ' , $ commit ['committer ' ]);
231- $ this ->assertArrayHasKey ('email ' , $ commit ['committer ' ]);
232- $ this ->assertArrayHasKey ('date ' , $ commit ['committer ' ]);
233- $ this ->assertIsString ($ commit ['committer ' ]['name ' ]);
234- $ this ->assertIsString ($ commit ['committer ' ]['email ' ]);
235- $ this ->assertIsString ($ commit ['committer ' ]['date ' ]);
204+ $ this ->assertSame ('8d660283c5c88a04bac7a2b3aa9ad9eaff0fd05e ' , $ commit ['hash ' ]);
205+ $ this ->assertSame ('master ' , $ commit ['branch ' ]);
206+ $ this ->assertSame (
207+ 'Update po files ' . "\n\n" . '[ci skip] ' . "\n\n" . 'Signed-off-by: phpMyAdmin bot <bot@phpmyadmin.net> ' ,
208+ $ commit ['message ' ],
209+ );
210+ $ this ->assertTrue ($ commit ['is_remote_commit ' ]);
211+ $ this ->assertTrue ($ commit ['is_remote_branch ' ]);
212+ $ this ->assertSame ('phpMyAdmin bot ' , $ commit ['author ' ]['name ' ]);
213+ $ this ->assertSame ('bot@phpmyadmin.net ' , $ commit ['author ' ]['email ' ]);
214+ $ this ->assertSame ('2023-05-14T00:19:49Z ' , $ commit ['author ' ]['date ' ]);
215+ $ this ->assertSame ('phpMyAdmin bot ' , $ commit ['committer ' ]['name ' ]);
216+ $ this ->assertSame ('bot@phpmyadmin.net ' , $ commit ['committer ' ]['email ' ]);
217+ $ this ->assertSame ('2023-05-14T00:19:49Z ' , $ commit ['committer ' ]['date ' ]);
236218
237219 rmdir ($ this ->testDir . '.git/objects/pack ' );
238220 rmdir ($ this ->testDir . '.git/objects ' );
@@ -306,7 +288,7 @@ public function testCheckGitRevisionPacksFile(): void
306288 '# pack-refs with: peeled fully-peeled sorted ' . "\n" .
307289 'c1f2ff2eb0c3fda741f859913fd589379f4e4a8f refs/tags/4.3.10 ' . "\n" .
308290 '^6f2e60343b0a324c65f2d1411bf4bd03e114fb98 ' . "\n" .
309- '17bf8b7309919f8ac593d7c563b31472780ee83b refs/remotes/origin/master ' . "\n" ,
291+ '8d660283c5c88a04bac7a2b3aa9ad9eaff0fd05e refs/remotes/origin/master ' . "\n" ,
310292 );
311293 mkdir ($ this ->testDir . '.git/objects/info ' , 0777 , true );
312294 file_put_contents (
@@ -322,44 +304,26 @@ public function testCheckGitRevisionPacksFile(): void
322304
323305 if (
324306 $ commit === null
325- && ! isset ($ _SESSION ['PMA_VERSION_REMOTECOMMIT_17bf8b7309919f8ac593d7c563b31472780ee83b ' ])
307+ && ! isset ($ _SESSION ['PMA_VERSION_REMOTECOMMIT_8d660283c5c88a04bac7a2b3aa9ad9eaff0fd05e ' ])
326308 ) {
327309 $ this ->markTestSkipped ('Unable to get remote commit information. ' );
328310 }
329311
330312 $ this ->assertIsArray ($ commit );
331- $ this ->assertArrayHasKey ('hash ' , $ commit );
332- $ this ->assertEquals ('17bf8b7309919f8ac593d7c563b31472780ee83b ' , $ commit ['hash ' ]);
333-
334- $ this ->assertArrayHasKey ('branch ' , $ commit );
335- $ this ->assertEquals ('master ' , $ commit ['branch ' ]);
336-
337- $ this ->assertArrayHasKey ('message ' , $ commit );
338- $ this ->assertIsString ($ commit ['message ' ]);
339-
340- $ this ->assertArrayHasKey ('is_remote_commit ' , $ commit );
341- $ this ->assertIsBool ($ commit ['is_remote_commit ' ]);
342-
343- $ this ->assertArrayHasKey ('is_remote_branch ' , $ commit );
344- $ this ->assertIsBool ($ commit ['is_remote_branch ' ]);
345-
346- $ this ->assertArrayHasKey ('author ' , $ commit );
347- $ this ->assertIsArray ($ commit ['author ' ]);
348- $ this ->assertArrayHasKey ('name ' , $ commit ['author ' ]);
349- $ this ->assertArrayHasKey ('email ' , $ commit ['author ' ]);
350- $ this ->assertArrayHasKey ('date ' , $ commit ['author ' ]);
351- $ this ->assertIsString ($ commit ['author ' ]['name ' ]);
352- $ this ->assertIsString ($ commit ['author ' ]['email ' ]);
353- $ this ->assertIsString ($ commit ['author ' ]['date ' ]);
354-
355- $ this ->assertArrayHasKey ('committer ' , $ commit );
356- $ this ->assertIsArray ($ commit ['committer ' ]);
357- $ this ->assertArrayHasKey ('name ' , $ commit ['committer ' ]);
358- $ this ->assertArrayHasKey ('email ' , $ commit ['committer ' ]);
359- $ this ->assertArrayHasKey ('date ' , $ commit ['committer ' ]);
360- $ this ->assertIsString ($ commit ['committer ' ]['name ' ]);
361- $ this ->assertIsString ($ commit ['committer ' ]['email ' ]);
362- $ this ->assertIsString ($ commit ['committer ' ]['date ' ]);
313+ $ this ->assertSame ('8d660283c5c88a04bac7a2b3aa9ad9eaff0fd05e ' , $ commit ['hash ' ]);
314+ $ this ->assertSame ('master ' , $ commit ['branch ' ]);
315+ $ this ->assertSame (
316+ 'Update po files ' . "\n\n" . '[ci skip] ' . "\n\n" . 'Signed-off-by: phpMyAdmin bot <bot@phpmyadmin.net> ' ,
317+ $ commit ['message ' ],
318+ );
319+ $ this ->assertTrue ($ commit ['is_remote_commit ' ]);
320+ $ this ->assertTrue ($ commit ['is_remote_branch ' ]);
321+ $ this ->assertSame ('phpMyAdmin bot ' , $ commit ['author ' ]['name ' ]);
322+ $ this ->assertSame ('bot@phpmyadmin.net ' , $ commit ['author ' ]['email ' ]);
323+ $ this ->assertSame ('2023-05-14T00:19:49Z ' , $ commit ['author ' ]['date ' ]);
324+ $ this ->assertSame ('phpMyAdmin bot ' , $ commit ['committer ' ]['name ' ]);
325+ $ this ->assertSame ('bot@phpmyadmin.net ' , $ commit ['committer ' ]['email ' ]);
326+ $ this ->assertSame ('2023-05-14T00:19:49Z ' , $ commit ['committer ' ]['date ' ]);
363327
364328 unlink ($ this ->testDir . '.git/objects/info/packs ' );
365329 rmdir ($ this ->testDir . '.git/objects/info ' );
0 commit comments