use OCP\Comments\CommentsEvent;
use OCP\Comments\IComment;
-use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Notification\IManager;
/** @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;
}
/**
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
);
}