summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2016-07-01 17:11:19 +0200
committerGitHub <noreply@github.com>2016-07-01 17:11:19 +0200
commit756b0c05b6ebc3e4f0addec67e96d3bdd2d5a11a (patch)
tree124d40453243102238e9d52d282099e660850dd8 /tests
parent7e4366ec860f9a03c1607364bb9c1d1d7997ccc1 (diff)
parentce6009e475557404c462ca1d3b94c126ddbb95df (diff)
downloadnextcloud-server-756b0c05b6ebc3e4f0addec67e96d3bdd2d5a11a.tar.gz
nextcloud-server-756b0c05b6ebc3e4f0addec67e96d3bdd2d5a11a.zip
Merge pull request #282 from nextcloud/fix-tests
Fix unit test compatibility issues with phpunit 5.2+
Diffstat (limited to 'tests')
-rw-r--r--tests/core/controller/avatarcontrollertest.php2
-rw-r--r--tests/lib/appframework/db/mappertest.php4
-rw-r--r--tests/lib/notification/notificationtest.php2
-rw-r--r--tests/lib/preview/movie.php5
-rw-r--r--tests/lib/preview/office.php5
-rw-r--r--tests/lib/share20/managertest.php2
6 files changed, 17 insertions, 3 deletions
diff --git a/tests/core/controller/avatarcontrollertest.php b/tests/core/controller/avatarcontrollertest.php
index 8e5e58904a7..c99b69228b1 100644
--- a/tests/core/controller/avatarcontrollertest.php
+++ b/tests/core/controller/avatarcontrollertest.php
@@ -93,7 +93,7 @@ class AvatarControllerTest extends \Test\TestCase {
$this->container['UserSession']->method('getUser')->willReturn($this->userMock);
$this->avatarFile = $this->getMock('OCP\Files\File');
- $this->avatarFile->method('getContnet')->willReturn('image data');
+ $this->avatarFile->method('getContent')->willReturn('image data');
$this->avatarFile->method('getMimeType')->willReturn('image type');
$this->avatarFile->method('getEtag')->willReturn('my etag');
}
diff --git a/tests/lib/appframework/db/mappertest.php b/tests/lib/appframework/db/mappertest.php
index c8b999ad62c..e2a70d9423a 100644
--- a/tests/lib/appframework/db/mappertest.php
+++ b/tests/lib/appframework/db/mappertest.php
@@ -236,7 +236,9 @@ class MapperTest extends MapperTestUtility {
$entity->resetUpdatedFields();
$this->db->expects($this->never())
- ->method('prepareQuery');
+ ->method('prepare');
+ $this->db->expects($this->never())
+ ->method('prepare');
$this->mapper->update($entity);
}
diff --git a/tests/lib/notification/notificationtest.php b/tests/lib/notification/notificationtest.php
index ee9454c77a0..bb9440a34d9 100644
--- a/tests/lib/notification/notificationtest.php
+++ b/tests/lib/notification/notificationtest.php
@@ -517,6 +517,7 @@ class NotificationTest extends TestCase {
->setMethods([
'isValidCommon',
'getSubject',
+ 'getParsedSubject',
])
->getMock();
@@ -547,6 +548,7 @@ class NotificationTest extends TestCase {
$notification = $this->getMockBuilder('\OC\Notification\Notification')
->setMethods([
'isValidCommon',
+ 'getSubject',
'getParsedSubject',
])
->getMock();
diff --git a/tests/lib/preview/movie.php b/tests/lib/preview/movie.php
index c6b0c0f7322..ef290092fc2 100644
--- a/tests/lib/preview/movie.php
+++ b/tests/lib/preview/movie.php
@@ -21,6 +21,11 @@
namespace Test\Preview;
+/**
+ * Class Movie
+ * @package Test\Preview
+ * @group DB
+ */
class Movie extends Provider {
public function setUp() {
diff --git a/tests/lib/preview/office.php b/tests/lib/preview/office.php
index 22eeb0aed33..9fcdd621031 100644
--- a/tests/lib/preview/office.php
+++ b/tests/lib/preview/office.php
@@ -21,6 +21,11 @@
namespace Test\Preview;
+/**
+ * Class Office
+ * @package Test\Preview
+ * @group DB
+ */
class Office extends Provider {
public function setUp() {
diff --git a/tests/lib/share20/managertest.php b/tests/lib/share20/managertest.php
index ece4ae23847..8f3417d53fd 100644
--- a/tests/lib/share20/managertest.php
+++ b/tests/lib/share20/managertest.php
@@ -590,7 +590,7 @@ class ManagerTest extends \Test\TestCase {
$share->method('getShareType')->willReturn($type);
$share->method('getSharedWith')->willReturn($sharedWith);
$share->method('getSharedBy')->willReturn($sharedBy);
- $share->method('getSharedOwner')->willReturn($shareOwner);
+ $share->method('getShareOwner')->willReturn($shareOwner);
$share->method('getNode')->willReturn($path);
$share->method('getPermissions')->willReturn($permissions);
$share->method('getExpirationDate')->willReturn($expireDate);