diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-07 20:24:06 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-07 20:42:38 +0200 |
commit | 80c519fe89857cfead7344025f2123e3b69665a8 (patch) | |
tree | 67aef1d1c9cec3e63a22fc14e863fc606e9438b0 /tests/lib/Share | |
parent | 65409f53274e6dbbfdcac1726546b9fd32c99677 (diff) | |
download | nextcloud-server-80c519fe89857cfead7344025f2123e3b69665a8.tar.gz nextcloud-server-80c519fe89857cfead7344025f2123e3b69665a8.zip |
Fix getMock Share
Diffstat (limited to 'tests/lib/Share')
-rw-r--r-- | tests/lib/Share/MailNotificationsTest.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/lib/Share/MailNotificationsTest.php b/tests/lib/Share/MailNotificationsTest.php index 0c951d11f88..d56efe57c9d 100644 --- a/tests/lib/Share/MailNotificationsTest.php +++ b/tests/lib/Share/MailNotificationsTest.php @@ -60,7 +60,7 @@ class MailNotificationsTest extends \Test\TestCase { ->disableOriginalConstructor()->getMock(); $this->user = $this->getMockBuilder('\OCP\IUser') ->disableOriginalConstructor()->getMock(); - $this->urlGenerator = $this->getMock('\OCP\IURLGenerator'); + $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->l10n->expects($this->any()) ->method('t') @@ -212,14 +212,17 @@ class MailNotificationsTest extends \Test\TestCase { $this->setupMailerMock('TestUser shared »welcome.txt« with you', ['recipient@owncloud.com' => 'Recipient'], false); /** @var MailNotifications | \PHPUnit_Framework_MockObject_MockObject $mailNotifications */ - $mailNotifications = $this->getMock('OC\Share\MailNotifications',['getItemSharedWithUser'], [ + $mailNotifications = $this->getMockBuilder(MailNotifications::class) + ->setMethods(['getItemSharedWithUser']) + ->setConstructorArgs([ $this->user, $this->l10n, $this->mailer, $this->logger, $this->defaults, $this->urlGenerator - ]); + ]) + ->getMock(); $mailNotifications->method('getItemSharedWithUser') ->withAnyParameters() |