Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/VCS/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ public function testDeleteRepository(): void
{
$result = $this->vcsAdapter->deleteRepository('test-kh', 'new-repo');
$this->assertEquals(true, $result);
$this->expectException(Exception::class);
$result = $this->vcsAdapter->deleteRepository('test-kh', 'new-repo-2');

try {
$result = $this->vcsAdapter->deleteRepository('test-kh', 'new-repo-2');
} catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e);
}
Comment on lines +134 to +139
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide some context? Why is the try catch preferable?

}
}