Skip to content

Wrongly file path selection when "test" shares the same namespace as "source" #795

Closed

Description

@przepompownia

Version: develop, with phpactor/phpunit-extension.

To reproduce, you can use the example from:
https://github.com/przepompownia/phpactor-bug-shared-namespace

  • open src/Domain/Example.php
  • :call phpactor#Navigate(), select test
    The first dialog looks correctly:
    File "tests/Domain/ExampleTest.php" does not exist, generate new?:
    After confirm I get the message:
    Error from Phpactor: File "/tmp/phpactor-shared-namespace/src/Domain/Example.php" already exists and is non-empty.

Activity

  1. dantleech commented on Jul 8, 2019

    @dantleech
    Collaborator

    Fix here, but currently lacking test: #796

  2. przepompownia commented on Jul 8, 2019

    @przepompownia
    ContributorAuthor

    Class ExampleTest is generated correctly, but it turns out that it is not the end of the issue.

    Please try to navigate back from ExampleTest to source class. Only test destination is available.

  3. przepompownia commented on Feb 17, 2020

    @przepompownia
    ContributorAuthor

    Both bugs seems to be fixed 👍

  4. dantleech commented on Feb 17, 2020

    @dantleech
    Collaborator

    Thanks for confirming :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions