From d2dacb03ec0fdc13b83e3f54b524287a5adc5603 Mon Sep 17 00:00:00 2001 From: itismadness Date: Fri, 13 Oct 2023 00:09:21 +0000 Subject: [PATCH] Add empty data validate test --- tests/BencodeTorrentTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/BencodeTorrentTest.php b/tests/BencodeTorrentTest.php index e9eaa95..41887b9 100644 --- a/tests/BencodeTorrentTest.php +++ b/tests/BencodeTorrentTest.php @@ -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(); + } }