Skip to content
This repository has been 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
david0 opened this issue May 14, 2014 · 0 comments
Open

fix-class-names fails when class and base class is renamed #60

david0 opened this issue May 14, 2014 · 0 comments

Comments

@david0
Copy link
Contributor

david0 commented May 14, 2014

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 
         {
         }           
        """
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant