Cleanup comment tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-01-09 12:03:34 +01:00
parent 315645ada3
commit bb84db02cb
No known key found for this signature in database
GPG key ID: E166FD8976B3BAC8
2 changed files with 4 additions and 13 deletions

View file

@ -23,7 +23,6 @@ namespace OCA\Comments\Notification;
use OCP\Comments\CommentsEvent;
use OCP\Comments\IComment;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Notification\IManager;
@ -34,25 +33,19 @@ class Listener {
/** @var IUserManager */
protected $userManager;
/** @var IURLGenerator */
protected $urlGenerator;
/**
* Listener constructor.
*
* @param IManager $notificationManager
* @param IUserManager $userManager
* @param IURLGenerator $urlGenerator
*/
public function __construct(
IManager $notificationManager,
IUserManager $userManager,
IURLGenerator $urlGenerator
IUserManager $userManager
) {
$this->notificationManager = $notificationManager;
$this->userManager = $userManager;
$this->urlGenerator = $urlGenerator;
}
/**

View file

@ -46,14 +46,12 @@ class ListenerTest extends TestCase {
protected function setUp() {
parent::setUp();
$this->notificationManager = $this->getMockBuilder('\OCP\Notification\IManager')->getMock();
$this->userManager = $this->getMockBuilder('\OCP\IUserManager')->getMock();
$this->urlGenerator = $this->getMockBuilder('OCP\IURLGenerator')->getMock();
$this->notificationManager = $this->createMock(\OCP\Notification\IManager::class);
$this->userManager = $this->createMock(\OCP\IUserManager::class);
$this->listener = new Listener(
$this->notificationManager,
$this->userManager,
$this->urlGenerator
$this->userManager
);
}