Skip to content
Snippets Groups Projects
Commit dd7442ad authored by Steven Ayers's avatar Steven Ayers
Browse files

Issue #3331903 by imustakim: Fix the issues reported by phpcs

parent 428520f2
No related branches found
No related tags found
1 merge request!10Resolve #3331903 "Phpcs eslint"
Pipeline #39244 passed with warnings
Showing
with 128 additions and 88 deletions
......@@ -33,7 +33,10 @@ use Drupal\message_subscribe\Subscribers\DeliveryCandidateInterface;
function hook_message_subscribe_get_subscribers(MessageInterface $message, array $subscribe_options = [], array $context = []) {
return [
2 => new DeliveryCandidate(['subscribe_node'], ['sms'], 2),
7 => new DeliveryCandidate(['subscribe_og', 'subscribe_user'], ['sms', 'email'], 7),
7 => new DeliveryCandidate(['subscribe_og', 'subscribe_user'], [
'sms',
'email',
], 7),
];
}
......
name: 'Message subscribe email'
description: 'Provides email functionality for message subscribe.'
core_version_requirement: ^9 || ^10
package: Message
dependencies:
......
......@@ -32,7 +32,7 @@ function message_subscribe_email_flag_action_access($action, FlagInterface $flag
if (empty($sid) && $account->isAnonymous()) {
// Ensure something is in $_SESSION, otherwise the session ID will
// not persist.
// TODO: Replace this with something cleaner once core provides it.
// @todo Replace this with something cleaner once core provides it.
// See https://www.drupal.org/node/2865991.
$_SESSION['flag'] = TRUE;
......@@ -87,7 +87,10 @@ function message_subscribe_email_message_subscribe_get_subscribers_alter(array &
);
$debug && \Drupal::logger('message_subscribe_email')->debug(
'Gathering email subscriptions using flags: @flags for users: @uids',
['@flags' => implode(', ', $flag_ids), '@uids' => implode(', ', array_keys($uids))]
[
'@flags' => implode(', ', $flag_ids),
'@uids' => implode(', ', array_keys($uids)),
]
);
$all_email_subscribers = [];
......
......@@ -2,9 +2,9 @@
namespace Drupal\Tests\message_subscribe_email\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\Tests\BrowserTestBase;
/**
* Tests the views provided by this module for the UI.
......@@ -101,7 +101,7 @@ class ViewsTest extends BrowserTestBase {
$this->assertSession()->statusCodeEquals(200);
$this->drupalGet('user/' . $user->id() . '/message-subscribe/subscribe_node');
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->pageTextContains(t('You are not subscribed to any items.'));
$this->assertSession()->pageTextContains('You are not subscribed to any items.');
}
// Add a node, and subscribe user 2 to that node.
......@@ -113,19 +113,19 @@ class ViewsTest extends BrowserTestBase {
$this->drupalGet('user/' . $users[2]->id() . '/message-subscribe/subscribe_node');
// The node title (label) appears on the list of subscribed content.
$this->assertSession()->pageTextContains($node->label());
$this->assertSession()->pageTextContains(t("Don't send email"));
$this->assertSession()->pageTextContains("Don't send email");
// Subscribe user 2 to user 1.
$flag = $this->flagService->getFlagById('subscribe_user');
$this->flagService->flag($flag, $users[1], $users[2]);
$this->drupalGet('user/' . $users[2]->id() . '/message-subscribe/subscribe_user');
$this->assertSession()->pageTextContains($users[1]->label());
$this->assertSession()->pageTextContains(t("Don't send email"));
$this->assertSession()->pageTextContains("Don't send email");
// Login user 3.
$this->drupalLogin($users[3]);
$this->drupalGet('user/' . $users[3]->id() . '/message-subscribe');
$this->assertSession()->pageTextContains(t('You are not subscribed to any items.'));
$this->assertSession()->pageTextContains('You are not subscribed to any items.');
$flag = $this->flagService->getFlagById('subscribe_node');
$this->flagService->flag($flag, $node, $users[3]);
$this->drupalGet('user/' . $users[3]->id() . '/message-subscribe');
......
......@@ -85,17 +85,17 @@ class MessageSubscribeEmailTest extends WebDriverTestBase {
$this->drupalGet($this->nodes[2]->toUrl());
// Subscribe to the node.
$this->clickLink(t('Subscribe'));
$this->clickLink('Subscribe');
$this->assertSession()->assertWaitOnAjaxRequest();
$this->assertTrue((bool) $this->flagService->getFlagging($flag, $this->nodes[2], $this->users[2]));
// Unsubscribe from the node.
$this->clickLink(t('Unsubscribe'));
$this->clickLink('Unsubscribe');
$this->assertSession()->assertWaitOnAjaxRequest();
$this->assertFalse((bool) $this->flagService->getFlagging($flag, $this->nodes[2], $this->users[2]));
// Subscribe again!
$this->clickLink(t('Subscribe'));
$this->clickLink('Subscribe');
$this->assertSession()->assertWaitOnAjaxRequest();
$this->assertTrue((bool) $this->flagService->getFlagging($flag, $this->nodes[2], $this->users[2]));
}
......
......@@ -21,13 +21,13 @@ This code starts with some of the example modules in the Message stack, changing
Add the following to your composer.json to add necessary patches:
```
"patches": {
"drupal/message_subscribe": {
"Issue #2928789: Fatal exception with flag module": "https://www.drupal.org/files/issues/2019-12-15/account_id_2928789_0.patch",
"Issue #3101137: Fix endless loop": "https://www.drupal.org/files/issues/2019-12-15/3101137-fix-endless-loop.patch,
"Issue #3101141: Message Subscribe Email removes all emails": "https://www.drupal.org/files/issues/2019-12-15/3101141-check-email-flag_0.patch"
}
},
"patches": {
"drupal/message_subscribe": {
"Issue #2928789: Fatal exception with flag module": "https://www.drupal.org/files/issues/2019-12-15/account_id_2928789_0.patch",
"Issue #3101137: Fix endless loop": "https://www.drupal.org/files/issues/2019-12-15/3101137-fix-endless-loop.patch,
"Issue #3101141: Message Subscribe Email removes all emails": "https://www.drupal.org/files/issues/2019-12-15/3101141-check-email-flag_0.patch"
}
},
```
......@@ -58,4 +58,3 @@ Review the code in `message_implementation.module` to see what hooks are being
used to generate messages. You can alter them later as needed. Lots of examples
are provided, you won't use all of them, so remove and change as you
like.
......@@ -7,7 +7,7 @@ dependencies:
- field.field.message.update_node.field_published
- message.template.update_node
module:
- user
- user
third_party_settings: { }
id: message.update_node.mail_body
targetEntityType: message
......
......@@ -7,7 +7,7 @@ dependencies:
- field.field.message.update_node.field_published
- message.template.update_node
module:
- user
- user
third_party_settings: { }
id: message.update_node.mail_subject
targetEntityType: message
......
......@@ -5,28 +5,19 @@
* Holds hook implementation for the Message Subscribe Example module.
*/
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\node\Entity\Node;
use Drupal\comment\Entity\Comment;
use Drupal\user\Entity\User;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\message\Entity\Message;
use Drupal\message\MessageInterface;
use Drupal\message_subscribe\Subscribers\DeliveryCandidate;
use Drupal\node\Entity\Node;
use Drupal\user\Entity\User;
/**
* Implements hook_message_subscribe_get_subscribers_alter().
*
* Alter the subscribers list.
*
* @param \Drupal\message_subscribe\Subscribers\DeliveryCandidateInterface[] &$uids
* The array of delivery candidates as defined by
* `hook_message_subscribe_get_subscribers()`.
* @param array $values
* A keyed array of values containing:
* - 'context' - The context array.
* - 'entity_type' - The entity type ID.
* - 'entity' - The entity object
* - 'subscribe_options' - The subscribe options array.
* {@inheritdoc}
*/
function message_subscribe_example_message_subscribe_get_subscribers_alter(array &$uids, array $values) {
......@@ -52,7 +43,7 @@ function message_subscribe_example_message_subscribe_get_subscribers_alter(array
// a custom list (see hook_user_insert() below). This is just an
// illustration of another solution.
$query = \Drupal::entityQuery('user')
->condition('status', 1);
->condition('status', 1);
$query->condition('roles', 'administrators');
$admin_uids = $query->execute();
foreach ($admin_uids as $uid) {
......@@ -69,7 +60,10 @@ function message_subscribe_example_node_insert(Node $node) {
// Add a message for the node author.
$template = $node->isPublished() ? 'publish_node' : 'create_node';
$message = Message::create(['template' => $template, 'uid' => $node->getOwnerId()]);
$message = Message::create([
'template' => $template,
'uid' => $node->getOwnerId(),
]);
$message->set('field_node_reference', $node);
$message->set('field_published', $node->isPublished());
$message->save();
......@@ -84,7 +78,7 @@ function message_subscribe_example_node_insert(Node $node) {
if (in_array($node->bundle(), ['article'])) {
// Find all active users.
$query = \Drupal::entityQuery('user')
->condition('status', 1);
->condition('status', 1);
$uids = $query->execute();
$users = User::loadMultiple($uids);
......@@ -165,7 +159,10 @@ function message_subscribe_example_comment_insert(Comment $comment) {
// Create a message for the node author.
$node = $comment->get('entity_id')->first()->get('entity')->getTarget()->getValue();
$message = Message::create(['template' => 'create_comment', 'uid' => $node->getOwnerId()]);
$message = Message::create([
'template' => 'create_comment',
'uid' => $node->getOwnerId(),
]);
$message->set('field_comment_reference', $comment);
$message->set('field_published', $comment->isPublished());
$message->save();
......@@ -195,7 +192,7 @@ function message_subscribe_example_user_insert(User $account) {
// or if you're automatically flagging administrators. It's just another
// illustration of things that can be done.
$query = \Drupal::entityQuery('user')
->condition('status', 1);
->condition('status', 1);
$query->condition('roles', 'administrator');
$admin_uids = $query->execute();
......@@ -211,7 +208,10 @@ function message_subscribe_example_user_insert(User $account) {
}
// Queue messages to our custom list of subscribers.
$message = Message::create(['template' => 'user_register', 'uid' => $account->id()]);
$message = Message::create([
'template' => 'user_register',
'uid' => $account->id(),
]);
$message->set('field_user', $account);
$message->set('field_published', $account->isActive());
$message->save();
......
......@@ -180,7 +180,7 @@ class SubscriptionController extends ControllerBase {
$prefix = $this->config->get('flag_prefix');
// View name + display ID.
$default_view_name = $prefix . '_' . $entity_type . ':default';
list($view_name, $display_id) = explode(':', $flag->getThirdPartySetting('message_subscribe_ui', 'view_name', $default_view_name));
[$view_name, $display_id] = explode(':', $flag->getThirdPartySetting('message_subscribe_ui', 'view_name', $default_view_name));
if (!$view = Views::getView($view_name)) {
// View doesn't exist.
......
......@@ -157,7 +157,11 @@ class Subscriptions extends BlockBase implements FormInterface, ContainerFactory
$entities += $entity->referencedEntities();
$form['description'] = [
'#type' => 'markup',
'#markup' => $this->t('Manage all <a href=":url">subscriptions</a>.', [':url' => Url::fromRoute('message_subscribe_ui.tab', ['user' => \Drupal::currentUser()->id()])->toString()]),
'#markup' => $this->t('Manage all <a href=":url">subscriptions</a>.', [
':url' => Url::fromRoute('message_subscribe_ui.tab',
['user' => $this->currentUser->id()],
)->toString(),
]),
];
$form['subscriptions'] = [
'#type' => 'container',
......@@ -232,7 +236,7 @@ class Subscriptions extends BlockBase implements FormInterface, ContainerFactory
* {@inheritdoc}
*/
public function validateForm(array &$form, FormStateInterface $form_state) {
// TODO: Implement validateForm() method.
// @todo Implement validateForm() method.
}
/**
......
......@@ -3,8 +3,8 @@
namespace Drupal\Tests\message_subscribe_ui\Functional;
use Drupal\entity_test\FieldStorageDefinition;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait;
/**
......@@ -96,7 +96,7 @@ class SubscriptionsBlockTest extends BrowserTestBase {
],
];
$this->createEntityReferenceField('node', 'article', 'field_terms_' . $i, NULL, 'taxonomy_term', 'default', $handler_settings, FieldStorageDefinition::CARDINALITY_UNLIMITED);
foreach (range(1, 5) as $j) {
for ($j = 0; $j < 5; $j += 1) {
$this->terms[] = $this->createTerm($vocab);
}
}
......@@ -115,7 +115,7 @@ class SubscriptionsBlockTest extends BrowserTestBase {
]);
// Place the subscription block.
$this->placeBlock('message_subscribe_ui_block', ['label' => t('Manage subscriptions')]);
$this->placeBlock('message_subscribe_ui_block', ['label' => 'Manage subscriptions']);
$this->flagService = $this->container->get('flag');
}
......@@ -127,24 +127,24 @@ class SubscriptionsBlockTest extends BrowserTestBase {
// Check that the block is empty when viewing another user.
$this->drupalGet($this->adminUser->toUrl());
$this->assertSession()->pageTextNotContains(t('Manage subscriptions'));
$this->assertSession()->pageTextNotContains(t('Subscribe to @label', ['@label' => $this->adminUser->getDisplayName()]));
$this->assertSession()->pageTextNotContains('Manage subscriptions');
$this->assertSession()->pageTextNotContains('Subscribe to ' . $this->adminUser->getDisplayName());
$this->drupalGet($this->node->toUrl());
$this->assertSession()->pageTextContains(t('Manage subscriptions'));
$this->assertSession()->pageTextContains('Manage subscriptions');
foreach ([1, 3, 7, 9] as $i) {
$this->assertSession()->pageTextContains(t('Subscribe to @title', ['@title' => $this->terms[$i]->label()]));
$this->assertSession()->pageTextContains('Subscribe to ' . $this->terms[$i]->label());
}
// The subscription to the node itself should be available.
$this->assertSession()->pageTextContains(t('Subscribe to @title', ['@title' => $this->node->label()]));
$this->assertSession()->pageTextNotContains(t('Subscribe to @label', ['@label' => $this->adminUser->getDisplayName()]));
$this->assertSession()->pageTextContains('Subscribe to ' . $this->node->label());
$this->assertSession()->pageTextNotContains('Subscribe to ' . $this->adminUser->getDisplayName());
// Subscribe to 1 and 7.
$edit = [
'subscriptions[taxonomy_term][' . $this->terms[1]->id() . ']' => TRUE,
'subscriptions[taxonomy_term][' . $this->terms[7]->id() . ']' => TRUE,
];
$this->submitForm($edit, t('Save'));
$this->submitForm($edit, 'Save');
$flag = $this->flagService->getFlagById('subscribe_term');
foreach ([1, 3, 7, 9] as $i) {
$term = $this->terms[$i];
......@@ -152,13 +152,13 @@ class SubscriptionsBlockTest extends BrowserTestBase {
$this->assertNotEmpty($this->flagService->getEntityFlaggings($flag, $term, $this->webUser));
// Subscriptions should be checked.
$this->assertSession()->checkboxChecked(t('Subscribe to @label', ['@label' => $term->label()]));
$this->assertSession()->checkboxChecked('Subscribe to ' . $term->label());
}
else {
$this->assertEmpty($this->flagService->getEntityFlaggings($flag, $term, $this->webUser));
// Subscriptions should not be unchecked.
$this->assertSession()->checkboxNotChecked(t('Subscribe to @label', ['@label' => $term->label()]));
$this->assertSession()->checkboxNotChecked('Subscribe to ' . $term->label());
}
}
......@@ -170,19 +170,19 @@ class SubscriptionsBlockTest extends BrowserTestBase {
$role->save();
$this->drupalGet($this->node->toUrl());
$this->assertSession()->pageTextContains(t('Subscribe to @label', ['@label' => $this->adminUser->getDisplayName()]));
$this->assertSession()->pageTextContains('Subscribe to ' . $this->adminUser->getDisplayName());
$this->drupalGet($this->adminUser->toUrl());
$this->assertSession()->pageTextContains(t('Subscribe to @label', ['@label' => $this->adminUser->getDisplayName()]));
$this->assertSession()->pageTextContains('Subscribe to ' . $this->adminUser->getDisplayName());
$edit = [
'subscriptions[user][' . $this->adminUser->id() . ']' => TRUE,
];
$this->submitForm($edit, t('Save'));
$this->submitForm($edit, 'Save');
$flag = $this->flagService->getFlagById('subscribe_user');
$this->assertNotEmpty($this->flagService->getEntityFlaggings($flag, $this->adminUser, $this->webUser));
// Subscriptions should be checked.
$this->assertSession()->checkboxChecked(t('Subscribe to @label', ['@label' => $this->adminUser->getDisplayName()]));
$this->assertSession()->checkboxChecked('Subscribe to ' . $this->adminUser->getDisplayName());
// Remove node and taxonomy flagging, and recheck the node page.
$role->revokePermission('flag subscribe_term');
......@@ -193,11 +193,11 @@ class SubscriptionsBlockTest extends BrowserTestBase {
$this->drupalGet($this->node->toUrl());
foreach ([1, 3, 7, 9] as $i) {
$this->assertSession()->pageTextNotContains(t('Subscribe to @title', ['@title' => $this->terms[$i]->label()]));
$this->assertSession()->pageTextNotContains('Subscribe to ' . $this->terms[$i]->label());
}
// The subscription to the node itself should not be available.
$this->assertSession()->pageTextNotContains(t('Subscribe to @title', ['@title' => $this->node->label()]));
$this->assertSession()->pageTextContains(t('Subscribe to @label', ['@label' => $this->adminUser->getDisplayName()]));
$this->assertSession()->pageTextNotContains('Subscribe to ' . $this->node->label());
$this->assertSession()->pageTextContains('Subscribe to ' . $this->adminUser->getDisplayName());
}
}
......@@ -2,14 +2,42 @@
namespace Drupal\message_subscribe\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Settings form for Message Subscribe.
*/
class MessageSubscribeAdminSettings extends ConfigFormBase {
/**
* The notifier plugin manager.
*
* @var \Drupal\Core\Plugin\DefaultPluginManager
*/
protected $notifierManager;
/**
* {@inheritdoc}
*/
public function __construct(ConfigFactoryInterface $config_factory, DefaultPluginManager $notifier_manager) {
$this->setConfigFactory($config_factory);
$this->notifierManager = $notifier_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('plugin.message_notify.notifier.manager')
);
}
/**
* {@inheritdoc}
*/
......@@ -44,11 +72,9 @@ class MessageSubscribeAdminSettings extends ConfigFormBase {
*/
public function buildForm(array $form, FormStateInterface $form_state) {
/** @var \Drupal\Core\Plugin\DefaultPluginManager $message_notifiers */
$message_notifiers = \Drupal::service('plugin.message_notify.notifier.manager');
$options = array_map(function ($definition) {
return $definition['title'];
}, $message_notifiers->getDefinitions());
}, $this->notifierManager->getDefinitions());
$config = $this->config('message_subscribe.settings');
......
......@@ -140,8 +140,8 @@ class Subscribers implements SubscribersInterface {
* {@inheritdoc}
*/
public function sendMessage(EntityInterface $entity, MessageInterface $message, array $notify_options = [], array $subscribe_options = [], array $context = []) {
$use_queue = isset($subscribe_options['use queue']) ? $subscribe_options['use queue'] : $this->config->get('use_queue');
$notify_message_owner = isset($subscribe_options['notify message owner']) ? $subscribe_options['notify message owner'] : $this->config->get('notify_own_actions');
$use_queue = $subscribe_options['use queue'] ?? $this->config->get('use_queue');
$notify_message_owner = $subscribe_options['notify message owner'] ?? $this->config->get('notify_own_actions');
// Save message by default.
$subscribe_options += [
......@@ -239,7 +239,10 @@ class Subscribers implements SubscribersInterface {
];
$result = $this->messageNotifier->send($cloned_message, $options, $notifier_name);
$this->debug($result ? 'Successfully sent message via notifier @notifier to user @uid' : 'Failed to send message via notifier @notifier to user @uid', ['@notifier' => $notifier_name, '@uid' => $uid]);
$this->debug($result ? 'Successfully sent message via notifier @notifier to user @uid' : 'Failed to send message via notifier @notifier to user @uid', [
'@notifier' => $notifier_name,
'@uid' => $uid,
]);
// Check we didn't timeout.
if ($use_queue && $subscribe_options['queue']['end time'] && time() < $subscribe_options['queue']['end time']) {
......@@ -271,7 +274,7 @@ class Subscribers implements SubscribersInterface {
*/
public function getSubscribers(EntityInterface $entity, MessageInterface $message, array $options = [], array &$context = []) {
$context = !empty($context) ? $context : $this->getBasicContext($entity, !empty($options['skip context']), $context);
$notify_message_owner = isset($options['notify message owner']) ? $options['notify message owner'] : $this->config->get('notify_own_actions');
$notify_message_owner = $options['notify message owner'] ?? $this->config->get('notify_own_actions');
$uids = [];
......
......@@ -59,18 +59,18 @@ interface SubscribersInterface {
* Example usage.
*
* @code
* $subscribe_options['uids'] = array(
* 1 => array(
* 'notifiers' => array('email'),
* ),
* );
* $context = array(
* 'node' => array(1),
* $subscribe_options['uids'] = [
* 1 => [
* 'notifiers' => ['email'],
* ],
* ];
* $context = [
* 'node' => [1],
* // The node author.
* 'user' => array(10),
* 'user' => [10],
* // Related taxonomy terms.
* 'taxonomy_term' => array(100, 200, 300)
* );
* 'taxonomy_term' => [100, 200, 300]
* ];
* @endcode
*/
public function sendMessage(EntityInterface $entity, MessageInterface $message, array $notify_options = [], array $subscribe_options = [], array $context = []);
......
......@@ -3,5 +3,5 @@ description: 'Functionality to assist message subscribe testing.'
type: module
core_version_requirement: ^8 || ^9
dependencies:
- message_subscribe
- message_subscribe:message_subscribe
package: Testing
......@@ -31,13 +31,13 @@ class MenuTest extends BrowserTestBase {
// Link should appear on main config page.
$this->drupalGet(Url::fromRoute('system.admin_config'));
$this->assertSession()->linkExists(t('Message subscribe settings'));
$this->assertSession()->linkExists('Message subscribe settings');
// Link should be on the message-specific overview page.
$this->drupalGet(Url::fromRoute('message.main_settings'));
$this->assertSession()->linkExists(t('Message subscribe settings'));
$this->assertSession()->linkExists('Message subscribe settings');
$this->clickLink(t('Message subscribe settings'));
$this->clickLink('Message subscribe settings');
$this->assertSession()->statusCodeEquals(200);
}
......
......@@ -36,11 +36,11 @@ class UninstallTest extends BrowserTestBase {
// Uninstall module.
$this->drupalGet('admin/modules/uninstall');
$this->assertSession()->statusCodeEquals(200);
$this->submitForm(['uninstall[message_subscribe]' => TRUE], t('Uninstall'));
$this->submitForm([], t('Uninstall'));
$this->submitForm(['uninstall[message_subscribe]' => TRUE], 'Uninstall');
$this->submitForm([], 'Uninstall');
// Validate Message Subscribe was uninstalled.
$this->assertSession()->pageTextContains(t('The selected modules have been uninstalled.'));
$this->assertSession()->pageTextContains('The selected modules have been uninstalled.');
$this->drupalGet(Url::fromRoute('message_subscribe.admin_settings'));
$this->assertSession()->statusCodeEquals(404);
}
......
......@@ -6,16 +6,17 @@ use Drupal\comment\CommentInterface;
use Drupal\comment\Entity\Comment;
use Drupal\comment\Tests\CommentTestTrait;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
use Drupal\og\Og;
use Drupal\og\OgGroupAudienceHelper;
use Drupal\taxonomy\Entity\Term;
use Drupal\taxonomy\Entity\Vocabulary;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
/**
* Test getting context from entity.
*
* @group message_subscribe
* @requires module og
*/
class ContextTest extends MessageSubscribeTestBase {
......
......@@ -2,8 +2,8 @@
namespace Drupal\Tests\message_subscribe\Kernel\Form;
use Drupal\message_subscribe\Form\MessageSubscribeAdminSettings;
use Drupal\KernelTests\ConfigFormTestBase;
use Drupal\message_subscribe\Form\MessageSubscribeAdminSettings;
/**
* Test the admin settings form.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment