本文整理汇总了PHP中ZurmoWalkthroughBaseTest::setUpBeforeClass方法的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoWalkthroughBaseTest::setUpBeforeClass方法的具体用法?PHP ZurmoWalkthroughBaseTest::setUpBeforeClass怎么用?PHP ZurmoWalkthroughBaseTest::setUpBeforeClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZurmoWalkthroughBaseTest
的用法示例。
在下文中一共展示了ZurmoWalkthroughBaseTest::setUpBeforeClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
SecurityTestHelper::createUsers();
// set up data owned by super
Yii::app()->user->userModel = User::getByUsername('super');
$account1 = AccountTestHelper::createAccountByNameForOwner('account1', Yii::app()->user->userModel);
$contact1 = ContactTestHelper::createContactWithAccountByNameForOwner('contact1', Yii::app()->user->userModel, $account1);
$contact2 = ContactTestHelper::createContactWithAccountByNameForOwner('contact2', Yii::app()->user->userModel, $account1);
$contact3 = ContactTestHelper::createContactWithAccountByNameForOwner('contact3', Yii::app()->user->userModel, $account1);
$marketingList1 = MarketingListTestHelper::createMarketingListByName('MarketingList1');
MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList1, $contact1);
MarketingListMemberTestHelper::createMarketingListMember(1, $marketingList1, $contact2);
$member1 = MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList1, $contact3);
static::$superUserMarketingListId = $marketingList1->id;
static::$superUserMemberId = $member1->id;
// set up data owned by nobody
Yii::app()->user->userModel = UserTestHelper::createBasicUser('nobody');
$account2 = AccountTestHelper::createAccountByNameForOwner('account2', Yii::app()->user->userModel);
$contact4 = ContactTestHelper::createContactWithAccountByNameForOwner('contact4', Yii::app()->user->userModel, $account2);
$contact5 = ContactTestHelper::createContactWithAccountByNameForOwner('contact5', Yii::app()->user->userModel, $account2);
$contact6 = ContactTestHelper::createContactWithAccountByNameForOwner('contact6', Yii::app()->user->userModel, $account2);
$marketingList2 = MarketingListTestHelper::createMarketingListByName('MarketingList2');
MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList2, $contact4);
$member2 = MarketingListMemberTestHelper::createMarketingListMember(1, $marketingList2, $contact5);
MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList2, $contact6);
static::$regularUserMarketingListId = $marketingList2->id;
static::$regularUserMemberId = $member2->id;
ReadPermissionsOptimizationUtil::rebuild();
}
开发者ID:youprofit,项目名称:Zurmo,代码行数:31,代码来源:MarketingListDefaultPortletControllerRegularUserWalkthroughTest.php
示例2: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$nobody = UserTestHelper::createBasicUser('nobody');
$nobody->setRight('MarketingListsModule', MarketingListsModule::getAccessRight());
$saved = $nobody->save();
static::assertTrue($saved);
Yii::app()->user->userModel = $nobody;
//Setup test data owned by the super user.
$account = AccountTestHelper::createAccountByNameForOwner('nobodyAccount', $nobody);
$marketingList1 = MarketingListTestHelper::createMarketingListByName('MarketingList1', 'MarketingList Description1');
$marketingList2 = MarketingListTestHelper::createMarketingListByName('MarketingList2', 'MarketingList Description2');
for ($i = 0; $i < 17; $i++) {
if ($i % 2) {
$unsubscribed = 0;
} else {
$unsubscribed = 1;
}
$contact1 = ContactTestHelper::createContactWithAccountByNameForOwner('nobodyContact1' . $i, $nobody, $account);
$contact2 = ContactTestHelper::createContactWithAccountByNameForOwner('nobodyContact2' . $i, $nobody, $account);
MarketingListMemberTestHelper::createMarketingListMember($unsubscribed, $marketingList1, $contact1);
MarketingListMemberTestHelper::createMarketingListMember($unsubscribed, $marketingList2, $contact2);
}
AllPermissionsOptimizationUtil::rebuild();
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:26,代码来源:MarketingListMemberControllerRegularUserWalkthroughTest.php
示例3: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
//Setup test data owned by the super user.
$account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount2', $super);
ContactTestHelper::createContactWithAccountByNameForOwner('superContact', $super, $account);
ContactTestHelper::createContactWithAccountByNameForOwner('superContact2', $super, $account);
OpportunityTestHelper::createOpportunityStagesIfDoesNotExist();
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp2', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp3', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp4', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp5', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp6', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp7', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp8', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp9', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp10', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp11', $super, $account);
OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp12', $super, $account);
//Setup default dashboard.
Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
}
示例4: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
//Setup test data owned by the super user.
AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount2', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount3', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount4', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount5', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount6', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount7', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount8', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount9', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount10', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount11', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount12', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount13', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount14', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount15', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount16', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount17', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount18', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount19', $super);
AccountTestHelper::createAccountByNameForOwner('superAccount20', $super);
//Setup default dashboard.
Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
}
示例5: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
}
示例6: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
SecurityTestHelper::createUsers();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
//Setup test data owned by the super user.
$account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
$account2 = AccountTestHelper::createAccountByNameForOwner('superAccount2', $super);
$contact1 = ContactTestHelper::createContactWithAccountByNameForOwner('superContact', $super, $account);
$contact2 = ContactTestHelper::createContactWithAccountByNameForOwner('superContact2', $super, $account2);
$contact3 = ContactTestHelper::createContactWithAccountByNameForOwner('superContact3', $super, $account);
$contact4 = ContactTestHelper::createContactWithAccountByNameForOwner('superContact4', $super, $account2);
$contact5 = ContactTestHelper::createContactWithAccountByNameForOwner('superContact5', $super, $account);
$marketingList1 = MarketingListTestHelper::createMarketingListByName('MarketingList1', 'MarketingList Description1');
$marketingList2 = MarketingListTestHelper::createMarketingListByName('MarketingList2', 'MarketingList Description2');
MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList1, $contact1);
MarketingListMemberTestHelper::createMarketingListMember(1, $marketingList1, $contact2);
MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList1, $contact3);
MarketingListMemberTestHelper::createMarketingListMember(1, $marketingList1, $contact4);
MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList1, $contact5);
MarketingListMemberTestHelper::createMarketingListMember(0, $marketingList2, $contact1);
MarketingListMemberTestHelper::createMarketingListMember(1, $marketingList2, $contact2);
AllPermissionsOptimizationUtil::rebuild();
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:26,代码来源:MarketingListDefaultPortletControllerSuperUserWalkthroughTest.php
示例7: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
AllPermissionsOptimizationUtil::rebuild();
}
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:8,代码来源:MarketingListDefaultControllerSuperUserWalkthroughTest.php
示例8: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
NotificationTestHelper::createNotificationByContentAndTypeForOwner('message1', $super);
}
示例9: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
ContactsModule::loadStartingData();
}
示例10: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
//Setup test data owned by the super user.
ProductTemplateTestHelper::createProductTemplateByName('My Product Template');
}
示例11: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
self::$asynchronousThreshold = ExportModule::$asynchronousThreshold;
ExportModule::$asynchronousThreshold = 3;
}
示例12: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
//Setup test data owned by the super user.
LeadTestHelper::createLeadbyNameForOwner('superLead', $super);
}
示例13: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
//Setup test data owned by the super user.
AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
AddressGeoCodeTestHelper::createAndRemoveAccountWithAddress($super);
}
示例14: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
MarketingListTestHelper::createMarketingListByName('MarketingListName', 'MarketingList Description', 'first', 'first@zurmo.com');
MarketingListTestHelper::createMarketingListByName('MarketingListName2', 'MarketingList Description2', 'second', 'second@zurmo.com');
ReadPermissionsOptimizationUtil::rebuild();
}
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:10,代码来源:MarketingListDefaultControllerSuperUserWalkthroughTest.php
示例15: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
Currency::makeBaseCurrency();
//Create a account for testing
$account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:10,代码来源:AccountsSuperUserCustomDateNullValueBugWalkthroughTest.php