paragraphs_pack_user_list.test in Paragraphs pack 7
File
modules/paragraphs_pack_user_list/tests/paragraphs_pack_user_list.test
View source
<?php
module_load_include('inc', 'paragraphs_pack', 'tests/paragraphs_pack.test_helper');
class ParagraphsPackUserListTestCase extends ParagraphsPackWebTestCase {
public static function getInfo() {
return array(
'name' => 'Paragraphs pack user list tests',
'description' => 'Tests: Paragraphs pack user list installation.',
'group' => 'Paragraphs pack',
);
}
public function setUp() {
parent::setUp('paragraphs_pack_user_list');
}
public function testParagraphsPackUserListBundle() {
$this
->check_bundle_existence(PP_BUNDLE_USER_LIST);
}
public function testParagraphsPackUserListFieldsExistence() {
$field_items_name = PP_FIELD_ITEMS . '_user';
$this
->check_field_existence(PP_FIELD_TITLE, PP_BUNDLE_USER_LIST);
$this
->check_field_existence($field_items_name, PP_BUNDLE_USER_LIST);
$this
->check_field_existence(PP_FIELD_VIEW_MODE, PP_BUNDLE_USER_LIST);
}
}
class ParagraphsPackUserListTestViewModeCase extends ParagraphsPackFeatureWebTestCase {
public static function getInfo() {
return array(
'name' => 'Test view mode on user list paragraph',
'description' => 'Ensure that the view mode works correctly on user list paragraph.',
'group' => 'Paragraphs pack',
);
}
public function setUp() {
parent::setUp('paragraphs_pack_test', 'paragraphs_pack_user_list');
$web_user = $this
->drupalCreateUser(array(
'bypass node access',
'administer content types',
'administer paragraphs bundles',
));
$this
->drupalLogin($web_user);
}
public function testParagraphsPackUserListViewModeOptions() {
$this
->check_view_mode_options('user');
}
}