本文整理汇总了PHP中AcceptanceTester::activate_theme方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::activate_theme方法的具体用法?PHP AcceptanceTester::activate_theme怎么用?PHP AcceptanceTester::activate_theme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcceptanceTester
的用法示例。
在下文中一共展示了AcceptanceTester::activate_theme方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('the administrator');
$I->wantTo('publish a new ad');
$I->login_admin();
$I->activate_theme('moderndeluxe');
$I->amOnPage('/publish-new.html');
$I->see('Publish new advertisement');
$I->fillField('#title', "Admin ad moderndeluxe theme");
$I->click('.select-category');
$I->fillField('category', '18');
$I->fillField('location', '57');
$I->fillField('#description', 'This is a new admin ad on moderndeluxe theme');
$I->attachFile('input[id="fileInput0"]', 'photo.jpg');
$I->fillField('#phone', '99885522');
$I->fillField('#address', 'barcelona');
$I->fillField('#price', '25');
$I->fillField('#website', 'https://www.admin.com');
$I->click('submit_btn');
$I->see('Advertisement is posted. Congratulations!');
$I->amOnPage('/apartment/admin-ad-moderndeluxe-theme.html');
$I->see('Admin ad moderndeluxe theme');
$I->see('This is a new admin ad on moderndeluxe theme');
$I->see('Barcelona');
$I->activate_theme('default');
$I->click('Logout');
示例2: AcceptanceTester
$I = new AcceptanceTester($scenario);
$I->am('the administrator');
$I->wantTo('CRUD widgets');
$I->login_admin();
// Categories
$I->wantTo('create a widget');
$I->amOnPage('/oc-panel/widget');
$I->click('Create');
$I->selectOption('placeholder', 'sidebar');
$I->click('Save changes');
// See on default theme
$I->amOnPage('/');
$I->seeElement('.col-md-3.col-sm-12.col-xs-12');
// See on splash theme
$I->activate_theme('splash');
$I->amOnPage('/');
$I->seeElement('.col-md-3.col-sm-12.col-xs-12');
// See on moderndeluxe3 theme
$I->activate_theme('moderndeluxe');
$I->amOnPage('/');
$I->seeElement('.col-md-3.col-sm-12.col-xs-12');
// See on olson theme
$I->activate_theme('olson');
$I->amOnPage('/all');
$I->seeElement('.col-md-3.col-sm-12.col-xs-12');
// See on reclassifieds3 theme
$I->activate_theme('reclassifieds');
$I->amOnPage('/');
$I->seeElement('.col-md-3.col-sm-12.col-xs-12');
// See on kamaleon theme
示例3: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('a user');
$I->wantTo('publish a new ad');
$I->login_admin();
$I->activate_theme('reclassifieds');
$I->click('Logout');
$I->amOnPage('/oc-panel/auth/login');
$I->fillField('email', 'gazzasdasd@reoc.lo');
$I->fillField('password', '1234');
$I->click('auth_redirect');
$I->amOnPage('/publish-new.html');
$I->see('Publish new advertisement');
$I->fillField('#title', "User ad on reclassifieds");
$I->click('.select-category');
$I->fillField('category', '18');
$I->fillField('location', '4');
$I->fillField('#description', 'This is a new user ad on reclassifieds theme');
$I->attachFile('input[type="file"]', 'photo.jpg');
$I->fillField('#phone', '99885522');
$I->fillField('#address', 'barcelona');
$I->fillField('#price', '25');
$I->fillField('#website', 'https://www.user.com');
$I->click('submit_btn');
$I->see('Advertisement is posted. Congratulations!');
$I->amOnPage('/apartment/user-ad-on-reclassifieds.html');
$I->see('User ad on reclassifieds');
$I->see('This is a new user ad on reclassifieds theme');
$I->see('Barcelona');
$I->click('Logout');
示例4: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('the administrator');
$I->wantTo('crud a custom field');
$I->login_admin();
// enable reviews
$I->amOnPage('/oc-panel/Config/update/reviews');
$I->fillField('#formorm_config_value', '1');
$I->click('button[type="submit"]');
$I->see('Item updated. Please to see the changes delete the cache');
// check all themes theme to premium
$I->activate_theme('splash');
$I->amOnPage('/jobs/just-random-title-here.html');
$I->see('leave a review', 'a');
$I->activate_theme('reclassifieds');
$I->amOnPage('/jobs/just-random-title-here.html');
$I->see('leave a review', 'a');
$I->activate_theme('reclassifieds');
$I->amOnPage('/jobs/just-random-title-here.html');
$I->see('leave a review', 'a');
$I->activate_theme('newspaper');
$I->amOnPage('/jobs/just-random-title-here.html');
$I->see('leave a review', 'a');
$I->activate_theme('czsale');
$I->amOnPage('/jobs/just-random-title-here.html');
$I->see('leave a review', 'a');
$I->activate_theme('ocean');
$I->amOnPage('/jobs/just-random-title-here.html');
$I->see('leave a review', 'a');
$I->activate_theme('moderndeluxe');
示例5: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('a visitor');
$I->wantTo('publish a new ad');
$I->login_admin();
$I->activate_theme('kamaleon');
$I->click('Logout');
$I->amOnPage('/publish-new.html');
$I->see('Publish new advertisement');
$I->fillField('#title', 'New ad unregister kamaleon');
$I->click('.select-category');
$I->fillField('category', '18');
$I->fillField('location', '4');
$I->fillField('#description', 'This is a new ad from unregister user on the kamaleon theme');
$I->attachFile('input[type="file"]', 'photo.jpg');
$I->fillField('#phone', '99885522');
$I->fillField('#address', 'barcelona');
$I->fillField('#price', '25');
$I->fillField('#website', 'https://www.google.com');
$I->fillField('#name', 'David');
$I->fillField('#email', 'david@gmail.com');
$I->click('submit_btn');
$I->see('Advertisement is posted. Congratulations!');
$I->amOnPage('/apartment/new-ad-unregister-kamaleon.html');
$I->see('New ad unregister kamaleon');
$I->see('This is a new ad from unregister user on the kamaleon theme');
$I->see('Barcelona');
// Check if user has created
$I->amOnPage('/user/david');
$I->dontSee('Page not found');
示例6:
$I->see('Item updated. Please to see the changes delete the cache');
// Create plan
$I->wantTo('activate Ocean Premium theme');
$I->amOnPage('/oc-panel/Plan/create');
$I->fillField('#formorm_name', 'Free plan');
$I->fillField('#formorm_seoname', 'free-plan');
$I->fillField('#formorm_description', 'This is the free plan, one free ad for each seven days');
$I->fillField('#formorm_price', '0');
$I->fillField('#formorm_days', '7');
$I->fillField('#formorm_amount_ads', '1');
$I->checkOption('formorm[status]');
$I->click('formorm[submit]');
$I->see('Item created. Please to see the changes delete the cache');
// Change to Ocean Premium (premium feature)
$I->wantTo('activate Ocean Premium theme');
$I->activate_theme('ocean');
// See plan
$I->wantTo('go to the publish page and see the plan.');
$I->amOnPage('/publish-new.html');
$I->seeElement('.alert.alert-info');
$I->see('Please, choose a plan first');
$I->see('Free plan', 'h3');
$I->see('This is the free plan, one free ad for each seven days', 'p');
$I->see('7 days', 'p');
$I->see('1 Ads', 'p');
$I->see('Sign Up');
$I->see('$0.00');
$I->seeElement('.btn.btn-success.btn-block');
// Buy plan
$I->wantTo('purchase the plan.');
$I->click("//a[@class='btn btn-success btn-block']");
示例7:
$I->fillField('name', 'telephone');
$I->fillField('label', 'telephone');
$I->fillField('tooltip', 'telephone');
$I->selectOption('form select[name="type"]', 'integer');
$I->checkOption('required');
$I->checkOption('searchable');
$I->checkOption('show_register');
$I->checkOption('show_profile');
$I->click('button[type="submit"]');
$I->see('Field telephone created');
$I->seeElement('.drag-item');
// delete all cache
$I->amOnPage('/oc-panel/tools/cache?force=1');
$I->see('All cache deleted');
// activate a premium theme to see the custom field!
$I->activate_theme('splash');
// delete all cache
$I->amOnPage('/oc-panel/tools/cache?force=1');
$I->see('All cache deleted');
// Not able to see my custom field from the test
// but it's displayed on http://reoc.lo/publish-new.html (Maybe an issue with PhpBrowser)
$I->amOnPage('/');
$I->click('Logout');
$I->amOnPage('/oc-panel/auth/register');
$I->seeElement('input', ['id' => 'cf_telephone']);
$I->login_admin();
$I->amOnPage('oc-panel/userfields');
$I->seeElement('.drag-item');
$I->amOnPage('http://reoc.lo/oc-panel/userfields/delete/telephone');
$I->amOnPage('oc-panel/userfields');
$I->dontSeeElement('.drag-item');