From 4c9734f6307b0773f7d92e19c62a58ad4e6ef7f1 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Fri, 15 May 2015 22:29:29 +0300 Subject: [PATCH] Test overriding channel --- tests/lib/public/util.php | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tests/lib/public/util.php diff --git a/tests/lib/public/util.php b/tests/lib/public/util.php new file mode 100644 index 00000000000..ebc4f70079b --- /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'] + ]; + } +}