@@ -344,6 +344,7 @@ public function testGetPullRequest(): void
344344
345345 public function testGenerateCloneCommand (): void
346346 {
347+ \exec ('rm -rf /tmp/clone-branch ' );
347348 $ gitCloneCommand = $ this ->vcsAdapter ->generateCloneCommand ('test-kh ' , 'test2 ' , 'test ' , GitHub::CLONE_TYPE_BRANCH , '/tmp/clone-branch ' , '* ' );
348349 $ this ->assertNotEmpty ($ gitCloneCommand );
349350 $ this ->assertStringContainsString ('sparse-checkout ' , $ gitCloneCommand );
@@ -358,6 +359,7 @@ public function testGenerateCloneCommand(): void
358359
359360 public function testGenerateCloneCommandWithCommitHash (): void
360361 {
362+ \exec ('rm -rf /tmp/clone-commit ' );
361363 $ gitCloneCommand = $ this ->vcsAdapter ->generateCloneCommand ('test-kh ' , 'test2 ' , '4fb10447faea8a55c5cad7b5ebdfdbedca349fe4 ' , GitHub::CLONE_TYPE_COMMIT , '/tmp/clone-commit ' , '* ' );
362364 $ this ->assertNotEmpty ($ gitCloneCommand );
363365 $ this ->assertStringContainsString ('sparse-checkout ' , $ gitCloneCommand );
@@ -372,6 +374,7 @@ public function testGenerateCloneCommandWithCommitHash(): void
372374
373375 public function testGenerateCloneCommandWithTag (): void
374376 {
377+ \exec ('rm -rf /tmp/clone-tag /tmp/clone-tag2 /tmp/clone-tag3 ' );
375378 $ gitCloneCommand = $ this ->vcsAdapter ->generateCloneCommand ('test-kh ' , 'test2 ' , '0.1.0 ' , GitHub::CLONE_TYPE_TAG , '/tmp/clone-tag ' , '* ' );
376379 $ this ->assertNotEmpty ($ gitCloneCommand );
377380 $ this ->assertStringContainsString ('sparse-checkout ' , $ gitCloneCommand );
@@ -430,7 +433,7 @@ public function testGetCommit(): void
430433 $ this ->assertIsArray ($ commitDetails );
431434 $ this ->assertSame ('https://avatars.githubusercontent.com/u/43381712?v=4 ' , $ commitDetails ['commitAuthorAvatar ' ]);
432435 $ this ->assertSame ('https://github.com/vermakhushboo ' , $ commitDetails ['commitAuthorUrl ' ]);
433- $ this ->assertSame ('appwritedemoapp[bot] ' , $ commitDetails ['commitAuthor ' ]);
436+ $ this ->assertSame ('Khushboo Verma ' , $ commitDetails ['commitAuthor ' ]);
434437 $ this ->assertSame ('Initial commit ' , $ commitDetails ['commitMessage ' ]);
435438 $ this ->assertSame ('https://github.com/test-kh/test1/commit/7ae65094d56edafc48596ffbb77950e741e56412 ' , $ commitDetails ['commitUrl ' ]);
436439 $ this ->assertSame ('7ae65094d56edafc48596ffbb77950e741e56412 ' , $ commitDetails ['commitHash ' ]);
@@ -440,7 +443,7 @@ public function testGetLatestCommit(): void
440443 {
441444 $ commitDetails = $ this ->vcsAdapter ->getLatestCommit ('test-kh ' , 'test1 ' , 'test ' );
442445 $ this ->assertSame ('appwritedemoapp[bot] ' , $ commitDetails ['commitAuthor ' ]);
443- $ this ->assertSame ('https://avatars.githubusercontent.com/u/43381712 ?v=4 ' , $ commitDetails ['commitAuthorAvatar ' ]);
444- $ this ->assertSame ('https://github.com/vermakhushboo ' , $ commitDetails ['commitAuthorUrl ' ]);
446+ $ this ->assertSame ('https://avatars.githubusercontent.com/in/287220 ?v=4 ' , $ commitDetails ['commitAuthorAvatar ' ]);
447+ $ this ->assertSame ('https://github.com/apps/appwritedemoapp ' , $ commitDetails ['commitAuthorUrl ' ]);
445448 }
446449}
0 commit comments