diff options
author | Vincent Petry <vincent@nextcloud.com> | 2020-10-26 22:10:42 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2020-10-28 18:59:35 +0300 |
commit | 805b1cfc93cfc60247a26fcbece61ffe6804cb61 (patch) | |
tree | 7d9e5e5c9b66d53c8af53972eca46bd13d83aa5e /tests | |
parent | 7083bbc04fde33bdfad11e80cb7d43d86a562c39 (diff) |
Add size to system message from shared file
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/Chat/Parser/SystemMessageTest.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/php/Chat/Parser/SystemMessageTest.php b/tests/php/Chat/Parser/SystemMessageTest.php index 955cfaf3c..3231c45c3 100644 --- a/tests/php/Chat/Parser/SystemMessageTest.php +++ b/tests/php/Chat/Parser/SystemMessageTest.php @@ -433,6 +433,9 @@ class SystemMessageTest extends TestCase { $node->expects($this->once()) ->method('getMimeType') ->willReturn('text/plain'); + $node->expects($this->once()) + ->method('getSize') + ->willReturn(65530); $share = $this->createMock(IShare::class); $share->expects($this->once()) @@ -469,6 +472,7 @@ class SystemMessageTest extends TestCase { 'type' => 'file', 'id' => '54', 'name' => 'name', + 'size' => 65530, 'path' => 'name', 'link' => 'absolute-link', 'mimetype' => 'text/plain', @@ -490,6 +494,9 @@ class SystemMessageTest extends TestCase { $node->expects($this->once()) ->method('getMimeType') ->willReturn('httpd/unix-directory'); + $node->expects($this->once()) + ->method('getSize') + ->willReturn(65520); $share = $this->createMock(IShare::class); $share->expects($this->once()) @@ -529,6 +536,7 @@ class SystemMessageTest extends TestCase { 'type' => 'file', 'id' => '54', 'name' => 'name', + 'size' => 65520, 'path' => 'path/to/file/name', 'link' => 'absolute-link-owner', 'mimetype' => 'httpd/unix-directory', @@ -547,6 +555,9 @@ class SystemMessageTest extends TestCase { $node->expects($this->once()) ->method('getMimeType') ->willReturn('application/octet-stream'); + $node->expects($this->once()) + ->method('getSize') + ->willReturn(65510); $share = $this->createMock(IShare::class); $share->expects($this->once()) @@ -573,6 +584,9 @@ class SystemMessageTest extends TestCase { $file->expects($this->once()) ->method('getPath') ->willReturn('/user/files/Shared/different'); + $file->expects($this->once()) + ->method('getSize') + ->willReturn(65515); $userFolder = $this->createMock(Folder::class); $userFolder->expects($this->once()) @@ -602,6 +616,7 @@ class SystemMessageTest extends TestCase { 'type' => 'file', 'id' => '54', 'name' => 'different', + 'size' => 65515, 'path' => 'Shared/different', 'link' => 'absolute-link-owner', 'mimetype' => 'application/octet-stream', |