1
0

UtilTest.php 635 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace Test\PublicNamespace;
  8. class UtilTest extends \Test\TestCase {
  9. /**
  10. * @dataProvider channelProvider
  11. *
  12. * @param string $channel
  13. */
  14. public function testOverrideChannel($channel): void {
  15. \OCP\Util::setChannel($channel);
  16. $actual = \OCP\Util::getChannel($channel);
  17. $this->assertEquals($channel, $actual);
  18. }
  19. public function channelProvider() {
  20. return [
  21. ['daily'],
  22. ['beta'],
  23. ['stable'],
  24. ['production']
  25. ];
  26. }
  27. }