當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ZurmoBaseTest類代碼示例

本文整理匯總了PHP中ZurmoBaseTest的典型用法代碼示例。如果您正苦於以下問題:PHP ZurmoBaseTest類的具體用法?PHP ZurmoBaseTest怎麽用?PHP ZurmoBaseTest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ZurmoBaseTest類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     AllPermissionsOptimizationUtil::rebuild();
     SecurityTestHelper::createSuperAdmin();
     $everyoneGroup = Group::getByName(Group::EVERYONE_GROUP_NAME);
     assert($everyoneGroup->save());
     // Not Coding Standard
     $group1 = new Group();
     $group1->name = 'Group1';
     assert($group1->save());
     // Not Coding Standard
     $group2 = new Group();
     $group2->name = 'Group2';
     assert($group2->save());
     // Not Coding Standard
     $group3 = new Group();
     $group3->name = 'Group3';
     assert($group3->save());
     // Not Coding Standard
     $group4 = new Group();
     $group4->name = 'Group4';
     assert($group4->save());
     // Not Coding Standard
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:25,代碼來源:ExplicitReadWriteModelPermissionsUtilTest.php

示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $billy = UserTestHelper::createBasicUser('billy');
     EmailBox::resolveAndGetByName(EmailBox::NOTIFICATIONS_NAME);
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:7,代碼來源:EmailMessageSendErrorTest.php

示例3: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     AllPermissionsOptimizationUtil::rebuild();
     $box = EmailBox::resolveAndGetByName(EmailBox::NOTIFICATIONS_NAME);
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:7,代碼來源:EmailArchivingUtilTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     if (!EmailMessageTestHelper::isSetEmailAccountsTestConfiguration()) {
         $this->markTestSkipped('Please fix the test email settings');
     }
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:7,代碼來源:ProcessOutboundEmailJobTest.php

示例5: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = User::getByUsername('super');
     ReadPermissionsOptimizationUtil::rebuild();
     SecurityTestHelper::createUsers();
     $billy = User::getByUsername('billy');
     EmailMessageTestHelper::createEmailAccount($billy);
     $billy->setRight('ContactsModule', ContactsModule::RIGHT_ACCESS_CONTACTS);
     $billy->setRight('ContactsModule', ContactsModule::RIGHT_CREATE_CONTACTS);
     $billy->setRight('ContactsModule', ContactsModule::RIGHT_DELETE_CONTACTS);
     assert($billy->save());
     // Not Coding Standard
     $contact = ContactTestHelper::createContactByNameForOwner('sally', Yii::app()->user->userModel);
     $contact->primaryEmail = new Email();
     $contact->primaryEmail->emailAddress = 'sally@zurmoland.com';
     $contact->secondaryEmail->emailAddress = 'toMakeSureNoFreeze@works.com';
     $contact->addPermissions($billy, Permission::READ);
     $contact->addPermissions($billy, Permission::WRITE);
     $contact->save();
     $molly = ContactTestHelper::createContactByNameForOwner('molly', User::getByUsername('bobby'));
     $molly->primaryEmail = new Email();
     $molly->primaryEmail->emailAddress = 'molly@zurmoland.com';
     $molly->secondaryEmail->emailAddress = 'toMakeSureNoFreeze@works.zur';
     $contact->save();
     ReadPermissionsOptimizationUtil::securableItemGivenPermissionsForUser($contact, $billy);
 }
開發者ID:sandeep1027,項目名稱:zurmo_,代碼行數:28,代碼來源:EmailMessageUtilTest.php

示例6: teardown

 public function teardown()
 {
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     Account::deleteAll();
     parent::teardown();
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:7,代碼來源:StarredUtilTest.php

示例7: teardown

 public function teardown()
 {
     if ($this->freeze) {
         RedBeanDatabase::freeze();
     }
     parent::teardown();
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:7,代碼來源:MatrixReportDataProviderTest.php

示例8: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     UserTestHelper::createBasicUser('billy');
     UserTestHelper::createBasicUser('sally');
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:7,代碼來源:ZurmoControllerUtilTest.php

示例9: teardown

 public function teardown()
 {
     $marketingLists = MarketingList::getAll();
     $this->assertCount(1, $marketingLists);
     $marketingLists[0]->delete();
     parent::teardown();
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:7,代碼來源:MarketingListPerformanceChartDataProviderTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     Yii::app()->user->userModel = User::getByUsername('super');
     EmailMessage::deleteAll();
     Notification::deleteAll();
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:7,代碼來源:TaskNotificationUtilTest.php

示例11: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = SecurityTestHelper::createSuperAdmin();
     $super->primaryEmail->emailAddress = 'super@zurmo.com';
     $super->save();
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:7,代碼來源:GamificationUtilTest.php

示例12: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     ZurmoDatabaseCompatibilityUtil::dropStoredFunctionsAndProcedures();
     SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = User::getByUsername('super');
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:7,代碼來源:ActionSecurityFactoryTest.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     if (!SendGridTestHelper::isSetSendGridAccountTestConfiguration()) {
         $this->markTestSkipped(Zurmo::t('SendGridModule', 'Email test settings are missing.'));
     }
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:7,代碼來源:SendGridEmailHelperTest.php

示例14: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = $super;
     AccountTestHelper::createAccountByNameForOwner('anAccount', $super);
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:7,代碼來源:TaskStatusDropDownRedBeanModelAttributeValueToExportValueAdapterTest.php

示例15: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     ContactsModule::loadStartingData();
     //Need to instantiate a controller so the clipWidget can work properly in elements that utilize it.
     $controller = Yii::app()->createController('reports/default');
     list($controller, $actionId) = $controller;
     Yii::app()->setController($controller);
     $values = array('Test1', 'Test2', 'Test3', 'Sample', 'Demo');
     $customFieldData = CustomFieldData::getByName('ReportTestDropDown');
     $customFieldData->serializedData = serialize($values);
     $saved = $customFieldData->save();
     assert($saved);
     // Not Coding Standard
     $values = array('Multi 1', 'Multi 2', 'Multi 3');
     $customFieldData = CustomFieldData::getByName('ReportTestMultiDropDown');
     $customFieldData->serializedData = serialize($values);
     $saved = $customFieldData->save();
     assert($saved);
     // Not Coding Standard
     $values = array('Radio 1', 'Radio 2', 'Radio 3');
     $customFieldData = CustomFieldData::getByName('ReportTestRadioDropDown');
     $customFieldData->serializedData = serialize($values);
     $saved = $customFieldData->save();
     assert($saved);
     // Not Coding Standard
     $values = array('Cloud 1', 'Cloud 2', 'Cloud 3');
     $customFieldData = CustomFieldData::getByName('ReportTestTagCloud');
     $customFieldData->serializedData = serialize($values);
     $saved = $customFieldData->save();
     assert($saved);
     // Not Coding Standard
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:34,代碼來源:ReportAttributeToElementAdapterTest.php


注:本文中的ZurmoBaseTest類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。