AttachmentTest.php 612 B

12345678910111213141516171819
  1. <?php
  2. namespace tests;
  3. class AttachmentTest extends Base
  4. {
  5. public function __construct()
  6. {
  7. parent::__construct();
  8. }
  9. public function testAttachmentUploadDownload()
  10. {
  11. $data = $this->attachment->uploadFile(dirname(__FILE__).'/assets/1.png');
  12. $this->assertArrayHasKey('uuid', $data);
  13. $this->assertIsInt($this->attachment->downloadFile(dirname(__FILE__).'/assets/11.png', $data['uuid'], $data['share-secret']));
  14. $this->assertIsInt($this->attachment->downloadThumb(dirname(__FILE__).'/assets/11_thumb.png', $data['uuid'], $data['share-secret']));
  15. }
  16. }