Fix unit tests

This commit is contained in:
Roeland Jago Douma 2016-02-11 11:21:12 +01:00
parent ee080a9bc3
commit 2aa206e900
1 changed files with 2 additions and 12 deletions

View File

@ -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([