-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Attributes] Cover slash newline in AnnotationToAttributeRector with …
…values (#6557) * use stubs for Then and When * cover slash newline in AnnotationToAttributeRector
- Loading branch information
1 parent
7f9dae6
commit 4b38333
Showing
8 changed files
with
104 additions
and
17 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...ests/Php80/Rector/Class_/AnnotationToAttributeRector/Fixture/Behat/with_next_line.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,30 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Behat; | ||
|
||
final class WithNextLine | ||
{ | ||
/** | ||
* @Then then :value should \ | ||
* continue here | ||
*/ | ||
public function someStep(): void | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Behat; | ||
|
||
final class WithNextLine | ||
{ | ||
#[\Behat\Step\Then('then :value should continue here')] | ||
public function someStep(): void | ||
{ | ||
} | ||
} | ||
|
||
?> |
29 changes: 29 additions & 0 deletions
29
...p80/Rector/Class_/AnnotationToAttributeRector/Fixture/Behat/with_value_edge_cases.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,29 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Behat; | ||
|
||
final class WithValueEdgeCases | ||
{ | ||
/** | ||
* @Then then :value should be have been finished | ||
*/ | ||
public function someStep(): void | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Behat; | ||
|
||
final class WithValueEdgeCases | ||
{ | ||
#[\Behat\Step\Then('then :value should be have been finished')] | ||
public function someStep(): void | ||
{ | ||
} | ||
} | ||
|
||
?> |
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
9 changes: 0 additions & 9 deletions
9
rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/Source/Attribute/Behat/When.php
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Behat\Step; | ||
|
||
if (class_exists('Behat\Step\Then')) { | ||
return; | ||
} | ||
|
||
class Then | ||
{ | ||
|
||
} |
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,12 @@ | ||
<?php | ||
|
||
namespace Behat\Step; | ||
|
||
if (class_exists('Behat\Step\When')) { | ||
return; | ||
} | ||
|
||
class When | ||
{ | ||
|
||
} |