helper.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use OCA\Files_sharing\Tests\TestCase;
  3. /**
  4. * ownCloud
  5. *
  6. * @author Bjoern Schiessle
  7. * @copyright 2014 Bjoern Schiessle <schiessle@owncloud.com>
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  11. * License as published by the Free Software Foundation; either
  12. * version 3 of the License, or any later version.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public
  20. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  21. *
  22. */
  23. class Test_Files_Sharing_Helper extends TestCase {
  24. /**
  25. * test set and get share folder
  26. */
  27. function testSetGetShareFolder() {
  28. $this->assertSame('/', \OCA\Files_Sharing\Helper::getShareFolder());
  29. \OCA\Files_Sharing\Helper::setShareFolder('/Shared');
  30. $this->assertSame('/Shared', \OCA\Files_Sharing\Helper::getShareFolder());
  31. // cleanup
  32. \OCP\Config::deleteSystemValue('share_folder');
  33. }
  34. }