-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for situation where the attribute already exists
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
.../Deprecation/ActionAnnotationToAttributeRector/fixture/existing_attribute_fixture.php.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,28 @@ | ||
<?php | ||
|
||
/** | ||
* A basic example action that does nothing. | ||
* | ||
* @Action( | ||
* id = "action_example_basic_action", | ||
* action_label = @Translation("Action Example: A basic example action that does nothing"), | ||
* type = "system" | ||
* ) | ||
*/ | ||
#[\Drupal\Core\Action\Attribute\Action(id: 'action_example_basic_action', action_label: new Drupal\Core\StringTranslation\TranslatableMarkup('Action Example: A basic example action that does nothing'), type: 'system')] | ||
class BasicExample extends ActionBase implements ContainerFactoryPluginInterface { | ||
|
||
} | ||
?> | ||
|
||
----- | ||
<?php | ||
|
||
/** | ||
* A basic example action that does nothing. | ||
*/ | ||
#[\Drupal\Core\Action\Attribute\Action(id: 'action_example_basic_action', action_label: new Drupal\Core\StringTranslation\TranslatableMarkup('Action Example: A basic example action that does nothing'), type: 'system')] | ||
class BasicExample extends ActionBase implements ContainerFactoryPluginInterface { | ||
|
||
} | ||
?> |