diff options
-rw-r--r-- | psalm.xml | 4 | ||||
-rw-r--r-- | tests/php/Chat/Parser/SystemMessageTest.php | 12 |
2 files changed, 12 insertions, 4 deletions
@@ -24,9 +24,10 @@ <referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL94Platform" /> <referencedClass name="Doctrine\DBAL\Types\Types" /> <referencedClass name="OC" /> - <referencedClass name="OCA\Files_Sharing\SharedStorage" /> <referencedClass name="OCA\Circles\Model\Circle" /> <referencedClass name="OCA\Circles\Model\Member" /> + <referencedClass name="OCA\DAV\CardDAV\PhotoCache" /> + <referencedClass name="OCA\Files_Sharing\SharedStorage" /> </errorLevel> </UndefinedClass> <UndefinedDocblockClass> @@ -40,6 +41,7 @@ <referencedClass name="Doctrine\DBAL\Schema\Table" /> <referencedClass name="OC\DB\ConnectionAdapter" /> <referencedClass name="OCA\Circles\Model\Member" /> + <referencedClass name="OCA\DAV\CardDAV\PhotoCache" /> </errorLevel> </UndefinedDocblockClass> <UndefinedInterfaceMethod> diff --git a/tests/php/Chat/Parser/SystemMessageTest.php b/tests/php/Chat/Parser/SystemMessageTest.php index 5f140fb23..c7ea3b78f 100644 --- a/tests/php/Chat/Parser/SystemMessageTest.php +++ b/tests/php/Chat/Parser/SystemMessageTest.php @@ -21,6 +21,7 @@ namespace OCA\Talk\Tests\php\Chat\Parser; +use OCA\DAV\CardDAV\PhotoCache; use OCA\Talk\Chat\Parser\SystemMessage; use OCA\Talk\Exceptions\ParticipantNotFoundException; use OCA\Talk\GuestManager; @@ -63,6 +64,8 @@ class SystemMessageTest extends TestCase { protected $previewManager; /** @var RoomShareProvider|MockObject */ protected $shareProvider; + /** @var PhotoCache|MockObject */ + protected $photoCache; /** @var IRootFolder|MockObject */ protected $rootFolder; /** @var IURLGenerator|MockObject */ @@ -78,6 +81,7 @@ class SystemMessageTest extends TestCase { $this->guestManager = $this->createMock(GuestManager::class); $this->previewManager = $this->createMock(IPreviewManager::class); $this->shareProvider = $this->createMock(RoomShareProvider::class); + $this->photoCache = $this->createMock(PhotoCache::class); $this->rootFolder = $this->createMock(IRootFolder::class); $this->url = $this->createMock(IURLGenerator::class); $this->l = $this->createMock(IL10N::class); @@ -107,6 +111,7 @@ class SystemMessageTest extends TestCase { $this->guestManager, $this->previewManager, $this->shareProvider, + $this->photoCache, $this->rootFolder, $this->url, ]) @@ -121,6 +126,7 @@ class SystemMessageTest extends TestCase { $this->guestManager, $this->previewManager, $this->shareProvider, + $this->photoCache, $this->rootFolder, $this->url ); @@ -540,7 +546,7 @@ class SystemMessageTest extends TestCase { $node->expects($this->once()) ->method('getName') ->willReturn('name'); - $node->expects($this->once()) + $node->expects($this->atLeastOnce()) ->method('getMimeType') ->willReturn('text/plain'); $node->expects($this->once()) @@ -601,7 +607,7 @@ class SystemMessageTest extends TestCase { $node->expects($this->once()) ->method('getPath') ->willReturn('/owner/files/path/to/file/name'); - $node->expects($this->once()) + $node->expects($this->atLeastOnce()) ->method('getMimeType') ->willReturn('httpd/unix-directory'); $node->expects($this->once()) @@ -666,7 +672,7 @@ class SystemMessageTest extends TestCase { $node->expects($this->once()) ->method('getName') ->willReturn('name'); - $node->expects($this->once()) + $node->expects($this->atLeastOnce()) ->method('getMimeType') ->willReturn('application/octet-stream'); $node->expects($this->once()) |