Skip to content

Not finding imported functions #3035

@nexxai

Description

@nexxai

I use Pest as my testing harness and phpactor seems to have a problem with finding its imported functions.

For example, in this code, I get a phpactor: Function "get" not found even though the test itself actually works correctly:

use function Pest\Laravel\get;

test('guests are redirected to the login page for admin dashboard', function () {
    $response = get(route('admin.dashboard'));
    $response->assertRedirect(route('login'));
});

I'm not sure if I'm doing something wrong or if this is a limitation of phpactor. If anyone has any insight, I'd love to hear.

Source:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions