-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(FullyQualifiedNamespace): Fix detection of class names at the beg…
…inning of attributes (#3483583)
- Loading branch information
Showing
6 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.4.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Drupal\action_link_test_plugins\Plugin\StateAction; | ||
|
||
use Drupal\action_link\Entity\ActionLinkInterface; | ||
use Drupal\action_link\Plugin\StateAction\StateActionBase; | ||
use Drupal\Core\Access\AccessResult; | ||
use Drupal\Core\Session\AccountInterface; | ||
|
||
/** | ||
* Test action which is always usable. | ||
*/ | ||
#[\Drupal\action_link\Attribute\StateAction( | ||
id: 'test_always', | ||
label: new \Drupal\Core\StringTranslation\TranslatableMarkup('Test Always'), | ||
description: new \Drupal\Core\StringTranslation\TranslatableMarkup('Test Always'), | ||
directions: [ | ||
'change' => 'change', | ||
] | ||
)] | ||
class TestAlways extends StateActionBase { | ||
} |
21 changes: 21 additions & 0 deletions
21
tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.4.inc.fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Drupal\action_link_test_plugins\Plugin\StateAction; | ||
|
||
use Drupal\Core\StringTranslation\TranslatableMarkup; | ||
use Drupal\action_link\Attribute\StateAction; | ||
use Drupal\action_link\Plugin\StateAction\StateActionBase; | ||
|
||
/** | ||
* Test action which is always usable. | ||
*/ | ||
#[StateAction( | ||
id: 'test_always', | ||
label: new TranslatableMarkup('Test Always'), | ||
description: new TranslatableMarkup('Test Always'), | ||
directions: [ | ||
'change' => 'change', | ||
] | ||
)] | ||
class TestAlways extends StateActionBase { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters