aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/EventSourceFactoryTest.php
blob: abd23e53bb57d16797f4db10e10df1729bac3780 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace Test;

use OC\EventSourceFactory;
use OCP\IEventSource;
use OCP\IRequest;
use OCP\Security\CSRF\ICsrfValidator;

class EventSourceFactoryTest extends TestCase {
	public function testCreate(): void {
		$request = $this->createMock(IRequest::class);
		$csrfValidator = $this->createMock(ICsrfValidator::class);
		$factory = new EventSourceFactory($request, $csrfValidator);

		$instance = $factory->create();
		$this->assertInstanceOf(IEventSource::class, $instance);
	}
}