Skip to content

Commit

Permalink
Add empty data validate test
Browse files Browse the repository at this point in the history
  • Loading branch information
itismadness committed Oct 13, 2023
1 parent 9a030b6 commit d2dacb0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/BencodeTorrentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,4 +522,11 @@ public function testEmptyPath(): void
$this->expectException(\RuntimeException::class);
$bencode->setData($data);
}

public function testValidateEmptyData(): void
{
$bencode = new BencodeTorrent();
$this->expectException(\TypeError::class);
$bencode->validate();
}
}

0 comments on commit d2dacb0

Please sign in to comment.