Skip to content

Commit e433087

Browse files
committed
Fix. Tests. Added verification of the argument type
1 parent e255921 commit e433087

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/ApbctWP/HTTP/TestSFWFilesDownloader.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ protected function tearDown(): void
5050
$apbct = $this->apbctBackup;
5151
}
5252

53+
/**
54+
* @test
55+
*/
56+
public function testThrowsExceptionWhenInvalidServicePassed()
57+
{
58+
$this->expectException(\InvalidArgumentException::class);
59+
$this->expectExceptionMessage('Service must be an instance of');
60+
61+
// Pass an invalid object (not HTTPMultiRequestService)
62+
new SFWFilesDownloader(new \stdClass());
63+
}
64+
5365
/**
5466
* @test
5567
*/

0 commit comments

Comments
 (0)