Skip to content

Commit

Permalink
Fix tests for subdir feature
Browse files Browse the repository at this point in the history
  • Loading branch information
korelstar committed Jan 8, 2017
1 parent 0ed48c5 commit f0e940b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/unit/service/NotesServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function setUp(){
$this->service = new NotesService($this->root, $this->l10n);
}

private function createNode($name, $type, $mime, $mtime=0, $content='', $id=0, $path='/') {
private function createNode($name, $type, $mime, $mtime=0, $content='', $id=0, $subdir='') {
if ($type === 'folder') {
$iface = 'OCP\Files\Folder';
} else {
Expand All @@ -60,7 +60,10 @@ private function createNode($name, $type, $mime, $mtime=0, $content='', $id=0, $
->will($this->returnValue($id));
$node->expects($this->any())
->method('getPath')
->will($this->returnValue($path));
->will($this->returnValue('/' . $this->userId . '/files/Notes/'.$subdir.($subdir ? '/' : '').$name));
$node->expects($this->any())
->method('getParent')
->will($this->returnValue($this->userFolder));
if ($type === 'file') {
$node->expects($this->any())
->method('getContent')
Expand Down

0 comments on commit f0e940b

Please sign in to comment.