public function tearDown() { if (!$this->_transactionId) { Calendar_Controller_Resource::getInstance()->delete($this->_toCleanup->id); } parent::tearDown(); }
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))))); }
public function tearDown() { parent::tearDown(); if (!$this->_transactionId) { $this->cleanupTestCalendars(); } }
/** * Tears down the fixture * This method is called after a test is executed. * * @access protected */ public function tearDown() { parent::tearDown(); if ($this->_emailTestClass instanceof Felamimail_Controller_MessageTest) { $this->_emailTestClass->tearDown(); } Calendar_Config::getInstance()->set(Calendar_Config::MAX_NOTIFICATION_PERIOD_FROM, 1); }
/** * tear down tests * */ public function tearDown() { parent::tearDown(); foreach ($this->_testEmailContacts as $email) { $contactIdsToDelete = Addressbook_Controller_Contact::getInstance()->search(new Addressbook_Model_ContactFilter(array(array('field' => 'containerType', 'operator' => 'equals', 'value' => 'all'), array('field' => 'email', 'operator' => 'equals', 'value' => $email))), null, false, true); Addressbook_Controller_Contact::getInstance()->delete($contactIdsToDelete); } }
/** * 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'; }
public function setUp() { parent::setUp(); $this->_controller = Calendar_Controller_Event::getInstance(); }
public function setUp() { parent::setUp(); $this->_uit = Calendar_Controller_MSEventFacade::getInstance(); }
/** * (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(); }
/** * (non-PHPdoc) * @see Calendar/Calendar_TestCase::setUp() */ public function setUp() { parent::setUp(); $this->_uit = new Calendar_Frontend_Json(); }