Exemplo n.º 1
0
 public static function postDeleteUser($parameters)
 {
     $app = new App('sipgate');
     $container = $app->getContainer();
     $logger = $container->query('OCP\\ILogger');
     $logger->warn('hello!');
 }
Exemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('popcornapp');
     $this->container = $app->getContainer();
     //echo var_dump($userSession);
     $this->controller = new XML('Test', array('/data/Pictures/holiday1.jpg', '/data/Pictures/holiday2.jpg', '/data/Pictures/holiday3.jpg', '/data/Pictures/holiday4.jpg'), 1);
 }
Exemplo n.º 3
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('popcornapp');
     $this->container = $app->getContainer();
     $this->request = $this->getMockBuilder('OCP\\IRequest')->getMock();
     //echo var_dump($userSession);
     $this->controller = new MltController('popcornapp', $this->request);
 }
Exemplo n.º 4
0
 public function setUp()
 {
     $app = new App('notes');
     $container = $app->getContainer();
     $container->registerService('UserId', function ($c) {
         return $this->userId;
     });
     $this->controller = $container->query('OCA\\Notes\\Controller\\NotesApiController');
     $this->fs = $container->query('OCP\\Files\\IRootFolder');
     $this->fs->newFolder($this->notesFolder);
 }
Exemplo n.º 5
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('ownnotes');
     $container = $app->getContainer();
     // only replace the user id
     $container->registerService('UserId', function ($c) {
         return $this->userId;
     });
     $this->controller = $container->query('OCA\\OwnNotes\\Controller\\NoteController');
     $this->mapper = $container->query('OCA\\OwnNotes\\Db\\NoteMapper');
 }
Exemplo n.º 6
0
 public function __construct()
 {
     $app = new App('sipgate');
     $this->container = $app->getContainer();
     $this->appName = $this->container->query('AppName');
     $this->db = $this->container->query('OCP\\IDBConnection');
     $this->config = $this->container->query('OCP\\IConfig');
     $this->logger = $this->container->query('OCA\\Sipgate\\Service\\AppLogger');
     $this->appSettings = $this->container->query('OCA\\Sipgate\\Service\\AppSettings');
     $reflect = new \ReflectionClass($this);
     $logSuffix = mb_strtolower($reflect->getShortName());
     $this->logger->setSuffix($logSuffix);
     // Run every 15 Minutes
     $this->setInterval(15 * 60);
 }
 public function setUp()
 {
     parent::setUp();
     $app = new App('files_sharing_ext');
     $this->container = $app->getContainer();
 }
 public function setUp()
 {
     parent::setUp();
     $app = new App('config_history');
     $this->container = $app->getContainer();
 }
Exemplo n.º 9
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('recipe');
     $this->container = $app->getContainer();
 }
Exemplo n.º 10
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('owncollabcalendar');
     $this->container = $app->getContainer();
 }
Exemplo n.º 11
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('gpstracks');
     $this->container = $app->getContainer();
 }
Exemplo n.º 12
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('ajax_event_dispatcher');
     $this->container = $app->getContainer();
 }
Exemplo n.º 13
0
<?php

/**
 * ownCloud - shared_session
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Dauba <*****@*****.**>
 * @copyright Dauba 2016
 */
namespace OCA\Shared_Session\AppInfo;

use OCP\AppFramework\App;
use OCA\Shared_Session\DatabaseSessionHandler;
$app = new App('shared_session');
$serverContainer = $app->getContainer()->getServer();
$config = $serverContainer->getSystemConfig();
$handler = new DatabaseSessionHandler();
$handler->init($config->getValue("dbtype"), $config->getValue("dbhost"), $config->getValue("dbuser"), $config->getValue("dbpassword"), $config->getValue("dbname"));
$session_Est = session_set_save_handler($handler, true);
Exemplo n.º 14
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('fileshtmlpreview');
     $this->container = $app->getContainer();
 }
Exemplo n.º 15
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('user_shib');
     $this->container = $app->getContainer();
 }
Exemplo n.º 16
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('mail_external');
     $this->container = $app->getContainer();
 }
 public function setUp()
 {
     parent::setUp();
     $app = new App('show_all_activity');
     $this->container = $app->getContainer();
 }
Exemplo n.º 18
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('agreedisclaimer');
     $this->container = $app->getContainer();
 }
Exemplo n.º 19
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('sharing_group');
     $this->container = $app->getContainer();
 }
Exemplo n.º 20
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('activity_ext');
     $this->container = $app->getContainer();
 }
Exemplo n.º 21
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('singlesignon');
     $this->container = $app->getContainer();
 }
Exemplo n.º 22
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('popularitycontestserver');
     $this->container = $app->getContainer();
 }
Exemplo n.º 23
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('shared_session');
     $this->container = $app->getContainer();
 }
Exemplo n.º 24
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('files_external_aws');
     $this->container = $app->getContainer();
 }
 public function setUp()
 {
     parent::setUp();
     $app = new App('user_status_validator');
     $this->container = $app->getContainer();
 }
Exemplo n.º 26
0
 /**
  * Called before executing all tests in a suite
  *
  * If the module is injected, you need to use _initialize()
  *
  * @param array $settings
  */
 public function _beforeSuite($settings = [])
 {
     $this->coreTestCase = new CoreTestCase();
     $app = new App('gallery-test-setup');
     $this->container = $app->getContainer();
     $this->server = $this->container->getServer();
     $this->rootFolder = $this->server->getRootFolder();
     $this->userManager = $this->server->getUserManager();
     /**
      * Logging hooks are missing at the moment, so we need to disable encryption
      *
      * @link https://github.com/owncloud/core/issues/18085#issuecomment-128093797
      */
     $this->server->getConfig()->setAppValue('core', 'encryption_enabled', 'no');
     // This is because the filesystem is not properly cleaned up sometimes
     $this->server->getAppManager()->disableApp('files_trashbin');
     $this->setPreviewProviders();
     $this->createTestSetup($this->userId, $this->userPassword);
     $this->createTestSetup($this->sharerUserId, $this->sharerPassword);
     $this->createShares();
 }
Exemplo n.º 27
0
<?php

/**
 * ownCloud - sipgate
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Raphael Pigulla <*****@*****.**>
 * @copyright Raphael Pigulla 2015
 */
use OCP\AppFramework\App;
use OCA\Sipgate\Service\UserSettings;
$app = new App('sipgate');
$container = $app->getContainer();
/** @var OCP\IDateTimeZone $timeZone */
$timeZone = $container->query('OCP\\IDateTimeZone');
/** @var OCA\Sipgate\Service\UserSettings $userSettings */
$userSettings = $container->query('OCA\\Sipgate\\Service\\UserSettings');
$lastUpdated = $userSettings->getLastUpdated();
$lastUpdated->setTimezone($timeZone->getTimeZone());
$template = new \OCP\Template('sipgate', 'settings-personal');
$template->assign('username', $userSettings->getUsername());
$template->assign('password', $userSettings->getPassword());
$template->assign('retention', $userSettings->getRetention());
$template->assign('syncPeriod', $userSettings->getSyncPeriod());
$template->assign('localUris', implode(' ', $userSettings->getLocalURIs()));
$template->assign('defaultCountryCode', $userSettings->getDefaultCountryCode());
$template->assign('lastUpdated', $lastUpdated->format('Y-m-d H:i:s'));
$template->assign('SYNC_PERIOD_MIN', UserSettings::SYNC_PERIOD_MIN);
$template->assign('SYNC_PERIOD_MAX', UserSettings::SYNC_PERIOD_MAX);
Exemplo n.º 28
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('pilotlogbook');
     $this->container = $app->getContainer();
 }