public function setUp()
 {
     parent::setUp();
     Calendar_Controller_Event::getInstance()->doContainerACLChecks(true);
     $this->_uit = Calendar_Controller_MSEventFacade::getInstance();
     $this->_uit->setEventFilter(new Calendar_Model_EventFilter(array(array('field' => 'attender', 'operator' => 'equals', 'value' => array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => Tinebase_Core::getUser()->contact_id)), array('field' => 'attender_status', 'operator' => 'notin', 'value' => array(Calendar_Model_Attender::STATUS_DECLINED)))));
 }
 /**
  * Sets up the fixture.
  * This method is called before a test is executed.
  */
 public function setUp()
 {
     parent::setUp();
     $this->objects['initialContainer'] = Tinebase_Container::getInstance()->addContainer(new Tinebase_Model_Container(array('name' => Tinebase_Record_Abstract::generateUID(), 'type' => Tinebase_Model_Container::TYPE_PERSONAL, 'backend' => 'Sql', 'application_id' => Tinebase_Application::getInstance()->getApplicationByName('Calendar')->getId())));
     $this->objects['sharedContainer'] = Tinebase_Container::getInstance()->addContainer(new Tinebase_Model_Container(array('name' => Tinebase_Record_Abstract::generateUID(), 'type' => Tinebase_Model_Container::TYPE_SHARED, 'backend' => 'Sql', 'application_id' => Tinebase_Application::getInstance()->getApplicationByName('Calendar')->getId())));
     $prefs = new Calendar_Preference();
     $prefs->setValue(Calendar_Preference::DEFAULTCALENDAR, $this->objects['initialContainer']->getId());
     $_SERVER['REQUEST_URI'] = 'lars';
 }
 /**
  * (non-PHPdoc)
  * @see tests/tine20/Calendar/Calendar_TestCase::setUp()
  */
 public function setUp()
 {
     parent::setUp();
     $smtpConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::SMTP);
     if (empty($smtpConfig)) {
         $this->markTestSkipped('No SMTP config found: this is needed to send notifications.');
     }
     $this->_eventController = Calendar_Controller_Event::getInstance();
     $this->_notificationController = Calendar_Controller_EventNotifications::getInstance();
     $this->_setupPreferences();
 }
 /**
  * Sets up the fixture.
  * This method is called before a test is executed.
  */
 public function setUp()
 {
     if (Tinebase_User::getConfiguredBackend() === Tinebase_User::ACTIVEDIRECTORY) {
         // account email addresses are empty with AD backend
         $this->markTestSkipped('skipped for ad backend');
     }
     parent::setUp();
     $this->objects['initialContainer'] = Tinebase_Container::getInstance()->addContainer(new Tinebase_Model_Container(array('name' => Tinebase_Record_Abstract::generateUID(), 'type' => Tinebase_Model_Container::TYPE_PERSONAL, 'backend' => 'Sql', 'application_id' => Tinebase_Application::getInstance()->getApplicationByName('Calendar')->getId())));
     $this->objects['sharedContainer'] = Tinebase_Container::getInstance()->addContainer(new Tinebase_Model_Container(array('name' => Tinebase_Record_Abstract::generateUID(), 'type' => Tinebase_Model_Container::TYPE_SHARED, 'backend' => 'Sql', 'application_id' => Tinebase_Application::getInstance()->getApplicationByName('Calendar')->getId())));
     $prefs = new Calendar_Preference();
     $prefs->setValue(Calendar_Preference::DEFAULTCALENDAR, $this->objects['initialContainer']->getId());
     $_SERVER['REQUEST_URI'] = 'lars';
 }
 /**
  * (non-PHPdoc)
  * @see tests/tine20/Calendar/Calendar_TestCase::setUp()
  */
 public function setUp()
 {
     parent::setUp();
     Calendar_Controller_Event::getInstance()->sendNotifications(true);
     $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP, new Tinebase_Config_Struct())->toArray();
     if (empty($smtpConfig)) {
         $this->markTestSkipped('No SMTP config found: this is needed to send notifications.');
     }
     $this->_eventController = Calendar_Controller_Event::getInstance();
     $this->_notificationController = Calendar_Controller_EventNotifications::getInstance();
     $this->_setupPreferences();
     Calendar_Config::getInstance()->set(Calendar_Config::MAX_NOTIFICATION_PERIOD_FROM, 52 * 10);
 }
Ejemplo n.º 6
0
 public function setUp()
 {
     parent::setUp();
     /**
      * set up personas personal container grants:
      * 
      *  jsmith:    anyone freebusyGrant, readGrant, addGrant, editGrant, deleteGrant
      *  pwulf:     anyone readGrant, sclever addGrant, readGrant, editGrant, deleteGrant, privateGrant
      *  sclever:   testuser addGrant, readGrant, editGrant, deleteGrant, privateGrant
      *  jmcblack:  prim group of testuser readGrant, testuser privateGrant
      *  rwright:   testuser freebusyGrant, sclever has readGrant and editGrant
      */
     $this->_setupTestCalendars();
     $this->_uit = Calendar_Controller_Event::getInstance();
 }
Ejemplo n.º 7
0
 public function setUp()
 {
     parent::setUp();
     $this->_controller = Calendar_Controller_Event::getInstance();
 }
 public function setUp()
 {
     parent::setUp();
     $this->_uit = Calendar_Controller_MSEventFacade::getInstance();
 }
 public function setUp()
 {
     parent::setUp();
     $this->_toCleanup = new Tinebase_Record_RecordSet('Calendar_Model_Resource');
 }
 /**
  * (non-PHPdoc)
  * @see Calendar/Calendar_TestCase::setUp()
  */
 public function setUp()
 {
     parent::setUp();
     Calendar_Controller_Event::getInstance()->doContainerACLChecks(true);
     $this->_uit = new Calendar_Frontend_Json();
 }
 public function setUp()
 {
     $this->_testEvent = new Calendar_Model_Event(array('dtstart' => '2010-12-30 12:00:00', 'dtend' => '2010-12-30 13:00:00', 'originator_tz' => 'Europe/Berlin', 'summary' => 'take a nap', 'description' => 'hard working man needs some silence', 'uid' => Tinebase_Record_Abstract::generateUID(), 'seq' => 3, 'transp' => Calendar_Model_Event::TRANSP_OPAQUE, 'class' => Calendar_Model_Event::CLASS_PUBLIC, 'location' => 'couch', 'priority' => 1, 'rrule' => 'FREQ=DAILY;INTERVAL=1;UNTIL=2015-12-30 13:00:00'));
     parent::setUp();
 }
Ejemplo n.º 12
0
 /**
  * (non-PHPdoc)
  * @see Calendar/Calendar_TestCase::setUp()
  */
 public function setUp()
 {
     parent::setUp();
     $this->_uit = new Calendar_Frontend_Json();
 }