diff --git a/tests/lib/public/util.php b/tests/lib/public/util.php new file mode 100644 index 0000000000..ebc4f70079 --- /dev/null +++ b/tests/lib/public/util.php @@ -0,0 +1,47 @@ +. + */ + +class Test_Public_Util extends \Test\TestCase { + protected function setUp() { + parent::setUp(); + OCP\Contacts::clear(); + } + + /** + * @dataProvider channelProvider + * + * @param string $channel + */ + public function testOverrideChannel($channel) { + \OCP\Util::setChannel($channel); + $actual = \OCP\Util::getChannel($channel); + $this->assertEquals($channel, $actual); + } + + public function channelProvider() { + return [ + ['daily'], + ['beta'], + ['stable'], + ['production'] + ]; + } +}