Skip to content

Commit f59bb9d

Browse files
committed
Add branch list test
1 parent c544e5a commit f59bb9d

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/VCS/Adapter/GiteaTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,21 @@ public function testListBranches(): void
14431443
}
14441444
}
14451445

1446+
public function testListBranchesEmptyRepo(): void
1447+
{
1448+
$repositoryName = 'test-list-branches-empty-' . \uniqid();
1449+
$this->vcsAdapter->createRepository(static::$owner, $repositoryName, false);
1450+
1451+
try {
1452+
$branches = $this->vcsAdapter->listBranches(static::$owner, $repositoryName);
1453+
1454+
$this->assertIsArray($branches);
1455+
$this->assertEmpty($branches);
1456+
} finally {
1457+
$this->vcsAdapter->deleteRepository(static::$owner, $repositoryName);
1458+
}
1459+
}
1460+
14461461
public function testCreateTag(): void
14471462
{
14481463
$repositoryName = 'test-create-tag-' . \uniqid();

0 commit comments

Comments
 (0)