use different files route/controller

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2016-10-07 17:27:33 +02:00
parent 522b053466
commit 006da9afd7
No known key found for this signature in database
GPG key ID: 7424F1874854DF23
2 changed files with 2 additions and 13 deletions

View file

@ -102,13 +102,9 @@ class Notifications extends Controller {
return new NotFoundResponse(); return new NotFoundResponse();
} }
$dir = $this->folder->getRelativePath($files[0]->getParent()->getPath());
$url = $this->urlGenerator->linkToRouteAbsolute( $url = $this->urlGenerator->linkToRouteAbsolute(
'files.view.index', 'files.viewcontroller.showFile',
[ [ 'fileid' => $comment->getObjectId() ]
'dir' => $dir,
'scrollto' => $files[0]->getName()
]
); );
$this->markProcessed($comment); $this->markProcessed($comment);

View file

@ -72,9 +72,6 @@ class NotificationsTest extends TestCase {
->will($this->returnValue($comment)); ->will($this->returnValue($comment));
$file = $this->getMockBuilder('\OCP\Files\Node')->getMock(); $file = $this->getMockBuilder('\OCP\Files\Node')->getMock();
$file->expects($this->once())
->method('getParent')
->will($this->returnValue($this->getMockBuilder('\OCP\Files\Folder')->getMock()));
$this->folder->expects($this->once()) $this->folder->expects($this->once())
->method('getById') ->method('getById')
@ -106,10 +103,6 @@ class NotificationsTest extends TestCase {
->with('42') ->with('42')
->will($this->throwException(new NotFoundException())); ->will($this->throwException(new NotFoundException()));
$file = $this->getMockBuilder('\OCP\Files\Node')->getMock();
$file->expects($this->never())
->method('getParent');
$this->folder->expects($this->never()) $this->folder->expects($this->never())
->method('getById'); ->method('getById');