Loading modules/sparkpost_requeue/config/install/sparkpost_requeue.settings.yml +1 −1 Original line number Diff line number Diff line enable: 0 enable: false max_retries: 10 minimum_time: 300 modules/sparkpost_requeue/sparkpost_requeue.info.yml +1 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ name: "Sparkpost Requeue" type: module description: "Requeue failed Sparpost messages" core: 8.x core_version_requirement: ^8 || ^9 package: Sparkpost configure: sparkpost_requeue.settings_form dependencies: Loading modules/sparkpost_requeue/tests/src/Functional/AdminSettingsTest.php 0 → 100644 +68 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\sparkpost_requeue\Functional; use Drupal\Tests\BrowserTestBase; /** * Test basic functionality. * * @group sparkpost */ class AdminSettingsTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; /** * {@inheritdoc} */ protected static $modules = ['sparkpost', 'sparkpost_requeue']; /** * Regular user. * * @var false|object */ protected $user; /** * Admin user. * * @var false|object */ protected $admin; /** * {@inheritdoc} */ public function setUp() : void { parent::setUp(); $this->user = $this->drupalCreateUser(); $this->admin = $this->drupalCreateUser([ 'access administration pages', ]); } /** * Access admin pages. */ public function testAdminAccess() { $this->drupalLogin($this->user); // Try access sparkpost requeue admin form. $this->drupalGet('admin/config/services/sparkpost_requeue'); $this->assertSession()->statusCodeEquals(403); // Login as admin. $this->drupalLogout(); $this->drupalLogin($this->admin); // Try access sparkpost admin form. $this->drupalGet('admin/config/services/sparkpost_requeue'); $this->assertSession()->statusCodeEquals(200); } } tests/src/Functional/AdminSettingsTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class AdminSettingsTest extends BrowserTestBase { /** * {@inheritdoc} */ public static $modules = ['sparkpost']; protected static $modules = ['sparkpost']; /** * Regular user. Loading @@ -38,7 +38,7 @@ class AdminSettingsTest extends BrowserTestBase { /** * {@inheritdoc} */ public function setUp() { public function setUp() : void { parent::setUp(); $this->user = $this->drupalCreateUser(); $this->admin = $this->drupalCreateUser([ Loading tests/src/Functional/SubjectFilterTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class SubjectFilterTest extends BrowserTestBase { /** * {@inheritdoc} */ public static $modules = ['sparkpost']; protected static $modules = ['sparkpost']; /** * Test the filtering of the subject. Loading Loading
modules/sparkpost_requeue/config/install/sparkpost_requeue.settings.yml +1 −1 Original line number Diff line number Diff line enable: 0 enable: false max_retries: 10 minimum_time: 300
modules/sparkpost_requeue/sparkpost_requeue.info.yml +1 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ name: "Sparkpost Requeue" type: module description: "Requeue failed Sparpost messages" core: 8.x core_version_requirement: ^8 || ^9 package: Sparkpost configure: sparkpost_requeue.settings_form dependencies: Loading
modules/sparkpost_requeue/tests/src/Functional/AdminSettingsTest.php 0 → 100644 +68 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\sparkpost_requeue\Functional; use Drupal\Tests\BrowserTestBase; /** * Test basic functionality. * * @group sparkpost */ class AdminSettingsTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; /** * {@inheritdoc} */ protected static $modules = ['sparkpost', 'sparkpost_requeue']; /** * Regular user. * * @var false|object */ protected $user; /** * Admin user. * * @var false|object */ protected $admin; /** * {@inheritdoc} */ public function setUp() : void { parent::setUp(); $this->user = $this->drupalCreateUser(); $this->admin = $this->drupalCreateUser([ 'access administration pages', ]); } /** * Access admin pages. */ public function testAdminAccess() { $this->drupalLogin($this->user); // Try access sparkpost requeue admin form. $this->drupalGet('admin/config/services/sparkpost_requeue'); $this->assertSession()->statusCodeEquals(403); // Login as admin. $this->drupalLogout(); $this->drupalLogin($this->admin); // Try access sparkpost admin form. $this->drupalGet('admin/config/services/sparkpost_requeue'); $this->assertSession()->statusCodeEquals(200); } }
tests/src/Functional/AdminSettingsTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class AdminSettingsTest extends BrowserTestBase { /** * {@inheritdoc} */ public static $modules = ['sparkpost']; protected static $modules = ['sparkpost']; /** * Regular user. Loading @@ -38,7 +38,7 @@ class AdminSettingsTest extends BrowserTestBase { /** * {@inheritdoc} */ public function setUp() { public function setUp() : void { parent::setUp(); $this->user = $this->drupalCreateUser(); $this->admin = $this->drupalCreateUser([ Loading
tests/src/Functional/SubjectFilterTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class SubjectFilterTest extends BrowserTestBase { /** * {@inheritdoc} */ public static $modules = ['sparkpost']; protected static $modules = ['sparkpost']; /** * Test the filtering of the subject. Loading