Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-06-10 16:34:57 +02:00
Родитель c58aa048d6
Коммит 09811cd6cc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
2 изменённых файлов: 14 добавлений и 9 удалений

Просмотреть файл

@ -31,24 +31,28 @@ use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IConfig;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\ILogger;
use OCP\IURLGenerator;
use OCP\Notification\IManager;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class CheckHostedSignalingServerTest extends TestCase {
/** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
/** @var ITimeFactory|MockObject */
protected $timeFactory;
/** @var HostedSignalingServerService|\PHPUnit\Framework\MockObject\MockObject */
/** @var HostedSignalingServerService|MockObject */
protected $hostedSignalingServerService;
/** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
/** @var IConfig|MockObject */
protected $config;
/** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
/** @var IManager|MockObject */
protected $notificationManager;
/** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
/** @var IGroupManager|MockObject */
protected $groupManager;
/** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
/** @var IURLGenerator|MockObject */
protected $urlGenerator;
/** @var ILogger|MockObject */
protected $logger;
public function setUp(): void {
parent::setUp();
@ -59,6 +63,7 @@ class CheckHostedSignalingServerTest extends TestCase {
$this->notificationManager = $this->createMock(IManager::class);
$this->groupManager = $this->createMock(IGroupManager::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->logger = $this->createMock(ILogger::class);
}
public function getBackgroundJob(): CheckHostedSignalingServer {
@ -68,7 +73,8 @@ class CheckHostedSignalingServerTest extends TestCase {
$this->config,
$this->notificationManager,
$this->groupManager,
$this->urlGenerator
$this->urlGenerator,
$this->logger
);
}

Просмотреть файл

@ -264,7 +264,6 @@ class NotifierTest extends \Test\TestCase {
[$uid, $u],
]);
$n = $this->getNotificationMock($parsedSubject, $uid, $displayName);
$this->notifier->prepare($n, 'de');
$n = $this->getNotificationMock($parsedSubject, $uid, $displayName);
@ -318,7 +317,7 @@ class NotifierTest extends \Test\TestCase {
$n->expects($this->once())
->method('getSubjectParameters')
->willReturn([$uid]);
$n->expects($this->once())
$n->expects($this->exactly(2))
->method('getObjectType')
->willReturn('room');
$n->expects($this->once())