summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/docker/mariadb/oc.cnf5
-rw-r--r--tests/lib/share20/managertest.php18
2 files changed, 11 insertions, 12 deletions
diff --git a/tests/docker/mariadb/oc.cnf b/tests/docker/mariadb/oc.cnf
new file mode 100644
index 00000000000..590284d4617
--- /dev/null
+++ b/tests/docker/mariadb/oc.cnf
@@ -0,0 +1,5 @@
+
+[mysqld]
+
+innodb_buffer_pool_size = 512M
+innodb_flush_log_at_trx_commit = 2
diff --git a/tests/lib/share20/managertest.php b/tests/lib/share20/managertest.php
index 73a1b0a6530..bb91ed0d51e 100644
--- a/tests/lib/share20/managertest.php
+++ b/tests/lib/share20/managertest.php
@@ -132,16 +132,10 @@ class ManagerTest extends \Test\TestCase {
}
/**
- * @expectedException \OCP\Share\Exceptions\ShareNotFound
+ * @expectedException \InvalidArgumentException
*/
public function testDeleteNoShareId() {
- $share = $this->getMock('\OCP\Share\IShare');
-
- $share
- ->expects($this->once())
- ->method('getFullId')
- ->with()
- ->willReturn(null);
+ $share = $this->manager->newShare();
$this->manager->deleteShare($share);
}
@@ -181,7 +175,6 @@ class ManagerTest extends \Test\TestCase {
->setNode($path)
->setTarget('myTarget');
- $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share);
$manager->expects($this->once())->method('deleteChildren')->with($share);
$this->defaultProvider
@@ -261,7 +254,6 @@ class ManagerTest extends \Test\TestCase {
$this->rootFolder->expects($this->never())->method($this->anything());
- $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share);
$manager->expects($this->once())->method('deleteChildren')->with($share);
$this->defaultProvider
@@ -359,8 +351,6 @@ class ManagerTest extends \Test\TestCase {
->setTarget('myTarget3')
->setParent(43);
- $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share1);
-
$this->defaultProvider
->method('getChildren')
->will($this->returnValueMap([
@@ -1549,6 +1539,7 @@ class ManagerTest extends \Test\TestCase {
'pathCreateChecks',
'validateExpirationDate',
'verifyPassword',
+ 'setLinkParent',
])
->getMock();
@@ -1589,6 +1580,9 @@ class ManagerTest extends \Test\TestCase {
$manager->expects($this->once())
->method('verifyPassword')
->with('password');
+ $manager->expects($this->once())
+ ->method('setLinkParent')
+ ->with($share);
$this->hasher->expects($this->once())
->method('hash')