Skip to content

Commit

Permalink
Skip GitTest when remote commit info is unavailable
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Mar 25, 2022
1 parent ff3ebc8 commit cbd23e5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/classes/GitTest.php
Expand Up @@ -233,6 +233,13 @@ public function testCheckGitRevisionPacksFolder(): void

$commit = $this->object->checkGitRevision();

if (
$commit === null
&& ! isset($_SESSION['PMA_VERSION_REMOTECOMMIT_17bf8b7309919f8ac593d7c563b31472780ee83b'])
) {
$this->markTestSkipped('Unable to get remote commit information.');
}

$this->assertIsArray($commit);
$this->assertArrayHasKey('hash', $commit);
$this->assertEquals('17bf8b7309919f8ac593d7c563b31472780ee83b', $commit['hash']);
Expand Down Expand Up @@ -359,6 +366,13 @@ public function testCheckGitRevisionPacksFile(): void

$commit = $this->object->checkGitRevision();

if (
$commit === null
&& ! isset($_SESSION['PMA_VERSION_REMOTECOMMIT_17bf8b7309919f8ac593d7c563b31472780ee83b'])
) {
$this->markTestSkipped('Unable to get remote commit information.');
}

$this->assertIsArray($commit);
$this->assertArrayHasKey('hash', $commit);
$this->assertEquals('17bf8b7309919f8ac593d7c563b31472780ee83b', $commit['hash']);
Expand Down

0 comments on commit cbd23e5

Please sign in to comment.