diff --git a/tests/Response/DocumentTelechargementResponseTest.php b/tests/Response/DocumentTelechargementResponseTest.php new file mode 100644 index 0000000..d28e7a9 --- /dev/null +++ b/tests/Response/DocumentTelechargementResponseTest.php @@ -0,0 +1,58 @@ + + * @package WBW\Library\Pappers\Tests\Response + */ +class DocumentTelechargementResponseTest extends AbstractTestCase { + + /** + * Tests saveAs() + * + * @return void + * @throws Throwable Throws an exception if an error occurs. + */ + public function testSaveAs(): void { + + // Set a filename mock. + $filename = __DIR__ . "/../../var/cache/DocumentTelechargementResponse.pdf"; + if (true === file_exists($filename)) { + unlink($filename); + } + + $obj = new DocumentTelechargementResponse(); + + $obj->saveAs($filename); + $this->assertFileExists($filename); + } + + /** + * Tests __construct() + * + * @return void + */ + public function test__construct(): void { + + $obj = new DocumentTelechargementResponse(); + + $this->assertInstanceOf(AbstractResponse::class, $obj); + } +}