This repository was archived by the owner on Jul 12, 2020. It is now read-only.
This repository was archived by the owner on Jul 12, 2020. It is now read-only.
fix-class-names fails when class and base class is renamed #60
Open
Description
fix-class-names fails with DeletedLineException
when the class itself and the base class should be renamed.
Testcase:
Scenario: "Rename class and its base class"
Given a PHP File named "src/Foo/Boing.php" with:
"""
<?php
namespace Foo;
class Foo extends Baes
{
}
"""
Given a PHP File named "src/Foo/Base.php" with:
"""
<?php
namespace Foo;
class Baes
{
}
"""
When I use refactoring "fix-class-names" with:
| arg | value |
| dir | src/ |
Then the PHP File "src/Foo.php" should be refactored:
"""
--- a/vfs://project/src/src/Foo/Boing.php
+++ b/vfs://project/src/src/Foo/Boing.php
@@ -1,6 +1,6 @@
<?php
namespace Foo;
-class Foo extends Baes
+class Boing extends Base
{
}
--- a/vfs://project/src/Foo/Base.php
+++ b/vfs://project/src/Foo/Base.php
@@ -1,5 +1,5 @@
<?php
namespace Foo;
-class Baes
+class Base
{
}
"""
Metadata
Metadata
Assignees
Labels
No labels