Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

use Drupal\Core\Url;
use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Tests that access to the user login form can be disabled.
*
* @group az_cas
*/
#[Group('az_cas')]
#[RunTestsInSeparateProcesses]
class AzCasDisableLoginFormTest extends QuickstartFunctionalTestBase {

/**
Expand Down Expand Up @@ -51,9 +54,8 @@ protected function setUp(): void {

/**
* Tests that access to the user login form is disabled.
*
* @dataProvider azCasSettingsProvider
*/
#[DataProvider('azCasSettingsProvider')]
public function testUserLoginFormBehavior($disable_login_form) {
$edit = [
'disable_login_form' => $disable_login_form,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
namespace Drupal\Tests\az_cas\Functional;

use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Tests that access to the password reset form can be disabled.
*
* @group az_cas
*/
#[Group('az_cas')]
#[RunTestsInSeparateProcesses]
class AzCasDisablePasswordResetTest extends QuickstartFunctionalTestBase {

/**
Expand Down Expand Up @@ -50,9 +53,8 @@ protected function setUp(): void {

/**
* Tests that access to the password reset form is disabled.
*
* @dataProvider azCasSettingsProvider
*/
#[DataProvider('azCasSettingsProvider')]
public function testPasswordResetBehavior($disable_password_recovery_link) {
$edit = [
'disable_password_recovery_link' => $disable_password_recovery_link,
Expand Down
6 changes: 4 additions & 2 deletions modules/custom/az_cas/tests/src/Functional/AzCasTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

use Drupal\Core\Url;
use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Tests for the AZ CAS module.
*
* @group az_cas
*/
#[Group('az_cas')]
#[RunTestsInSeparateProcesses]
class AzCasTest extends QuickstartFunctionalTestBase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
use Drupal\Tests\BrowserTestBase;
use Drupal\migrate\MigrateMessage;
use Drupal\migrate_tools\MigrateExecutable;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Test of attribute import functionality.
*
* @group az_enterprise_attributes_import
*/
#[Group('az_enterprise_attributes_import')]
#[RunTestsInSeparateProcesses]
class EnterpriseAttributesImportTest extends BrowserTestBase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace Drupal\Tests\az_core\Functional;

use Drupal\Tests\BrowserTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Tests cache invalidation when nodes are updated.
*
* @group az_core
*/
#[Group('az_core')]
#[RunTestsInSeparateProcesses]
class CacheInvalidationTest extends BrowserTestBase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace Drupal\Tests\az_core\Functional;

use Drupal\Core\Url;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Test to ensure the Quickstart settings clear cache button works correctly.
*
* @group az_core
*/
#[Group('az_core')]
#[RunTestsInSeparateProcesses]
class ClearCacheTest extends QuickstartFunctionalTestBase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace Drupal\Tests\az_core\Functional;

use Drupal\Tests\BrowserTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Test to ensure Quickstart configuration overrides work correctly.
*
* @ingroup az_core
*
* @group az_core
*/
#[Group('az_core')]
#[RunTestsInSeparateProcesses]
class ConfigOverrideTest extends BrowserTestBase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace Drupal\Tests\az_core\Functional;

use Drupal\Core\Url;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Test to ensure that monitoring page works correctly.
*
* @group az_core
*/
#[Group('az_core')]
#[RunTestsInSeparateProcesses]
class MonitoringPageTest extends QuickstartFunctionalTestBase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

use Drupal\az_core\Utility\AZBootstrapMarkupConverter;
use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;

/**
* Tests the AZ Bootstrap markup converter.
*
* @group az_core
*/
#[Group('az_core')]
class AZBootstrapMarkupConverterTest extends UnitTestCase {

/**
* Test fragments are converted correctly without adding document tags.
*
* @dataProvider provideFragments
*/
#[DataProvider('provideFragments')]
public function testFragmentConversion($input, $expected) {
$result = AZBootstrapMarkupConverter::convert($input);
$this->assertEquals($expected, $result);
Expand All @@ -33,9 +33,8 @@ public function testCompareProcessorNoChanges() {

/**
* Test that compareProcessor returns converted text when changes are needed.
*
* @dataProvider provideFragments
*/
#[DataProvider('provideFragments')]
public function testCompareProcessor($input, $expected) {
$result = AZBootstrapMarkupConverter::compareProcessor($input);
$this->assertEquals($expected, $result, 'Text with Bootstrap classes should be converted');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
use Drupal\Core\Url;
use Drupal\Core\Config\FileStorage;
use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Verify successful importing of demo content.
*
* @group az_demo
*/
#[Group('az_demo')]
#[RunTestsInSeparateProcesses]
class AZDemoContentTest extends QuickstartFunctionalTestBase {

/**
Expand Down
4 changes: 2 additions & 2 deletions modules/custom/az_finder/tests/AZFinderIconsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
namespace Drupal\Tests\az_finder\Unit;

use Drupal\az_finder\Service\AZFinderIcons;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

/**
* Tests the AZFinderIcons class.
*
* @group az_finder
*/
#[Group('az_finder')]
class AZFinderIconsTest extends TestCase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
namespace Drupal\Tests\az_global_footer\Functional;

use Drupal\Tests\BrowserTestBase;
use PHPUnit\Framework\Attributes\DoesNotPerformAssertions;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Tests the Quickstart Global Footer.
*
* @group az_global_footer
*/
#[Group('az_global_footer')]
#[RunTestsInSeparateProcesses]
class AzGlobalFooterTest extends BrowserTestBase {

/**
Expand All @@ -32,9 +35,9 @@ class AzGlobalFooterTest extends BrowserTestBase {

/**
* Tests that the Quickstart Global Footer module can be uninstalled.
*
* @group regression
*/
#[Group('regression')]
#[DoesNotPerformAssertions]
public function testIsUninstallableAndReinstallable() {

// Uninstalls the az_global_footer module, so hook_modules_uninstalled()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace Drupal\Tests\az_migration\Functional;

use Drupal\Tests\BrowserTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Tests the Quickstart Global Footer.
*
* @group az_global_footer
*/
#[Group('az_global_footer')]
#[RunTestsInSeparateProcesses]
class MigrateExceptionsTest extends BrowserTestBase {

/**
Expand Down Expand Up @@ -39,8 +41,6 @@ class MigrateExceptionsTest extends BrowserTestBase {

/**
* Tests that the Quickstart Global Footer module can be installed.
*
* @group regression
*/
public function testGlobalFooterMigration() {
// Install the az_global_footer module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace Drupal\Tests\az_paragraphs\Functional;

use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Run tests of paragraph bundles.
*
* @ingroup az_paragraphs
*
* @group az_paragraphs
*/
#[Group('az_paragraphs')]
#[RunTestsInSeparateProcesses]
class AZParagraphsTest extends QuickstartFunctionalTestBase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
namespace Drupal\Tests\az_paragraphs\FunctionalJavascript;

use Drupal\Tests\az_core\FunctionalJavascript\QuickstartFunctionalJavascriptTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations;
Comment thread
joeparsons marked this conversation as resolved.
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Run tests of paragraph bundles.
*
* @ingroup az_paragraphs_js
*
* @group az_paragraphs_js
*/
#[Group('az_paragraphs_js')]
#[IgnoreDeprecations]
#[IgnorePhpunitDeprecations]
Comment thread
joeparsons marked this conversation as resolved.
#[RunTestsInSeparateProcesses]
class AZParagraphsJavascriptTest extends QuickstartFunctionalJavascriptTestBase {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

use Drupal\Tests\UnitTestCase;
use Drupal\az_paragraphs\AZVideoEmbedHelper;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;

/**
* @coversDefaultClass \Drupal\az_paragraphs\AZVideoEmbedHelper
*
* @ingroup az_paragraphs
*
* @group az_paragraphs
* Test coverage for AZVideoEmbedHelper class.
*/
#[CoversClass(AZVideoEmbedHelper::class)]
#[Group('az_paragraphs')]
class AZVideoEmbedHelperTest extends UnitTestCase {

/**
Expand All @@ -29,11 +30,8 @@ protected function setUp(): void {

/**
* Tests parsing of YouTube video ID from URLs.
*
* @covers ::getYoutubeIdFromUrl
*
* @dataProvider providerYouTubeVideoData
*/
#[DataProvider('providerYouTubeVideoData')]
public function testGetYoutubeIdFromUrl($youtube_url, $expected_id) {
$this->assertEquals($expected_id, $this->videoEmbedHelper->getYoutubeIdFromUrl($youtube_url));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
namespace Drupal\Tests\az_publication\FunctionalJavascript;

use Drupal\Tests\az_core\FunctionalJavascript\QuickstartFunctionalJavascriptTestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
Comment thread
joeparsons marked this conversation as resolved.
use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
* Run tests of publication contributor role functionality.
*
* @ingroup az_publication
*
* @group az_publication
*/
#[Group('az_publication')]
#[IgnoreDeprecations]
Comment thread
joeparsons marked this conversation as resolved.
#[IgnorePhpunitDeprecations]
#[RunTestsInSeparateProcesses]
class AZPublicationInlineContributorTest extends QuickstartFunctionalJavascriptTestBase {

/**
Expand Down
Loading
Loading