aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/PublicNamespace/UtilTest.php
blob: 4fa31bd902a0ca1f2c519747756e3c6cca770900 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
 * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace Test\PublicNamespace;

class UtilTest extends \Test\TestCase {
	/**
	 * @dataProvider channelProvider
	 *
	 * @param string $channel
	 */
	public function testOverrideChannel($channel): void {
		\OCP\Util::setChannel($channel);
		$actual = \OCP\Util::getChannel($channel);
		$this->assertEquals($channel, $actual);
	}
	
	public function channelProvider() {
		return [
			['daily'],
			['beta'],
			['stable'],
			['production']
		];
	}
}