Skip to content

Unable to mock Laravel CLI artisan #6

Closed
@Vectorial1024

Description

@Vectorial1024

Inb4 people scream "but what about the Artisan facade".

Yes, the Artisan facade exists, and some tests in this library do use the Artisan facade to test some behavior, but given how closely this library works with the dependent code, just using the Artisan facade is not enough to test this library 100%. Specifically, testing actual concurrency requires the artisan file (and by extension, the entire Laravel framework) to exist, so that this library can correctly start the async runners.

However, this artisan file is surprisingly difficult to setup correctly, and it is very tedious to track and mirror the Laravel changes to the artisan file in this repo. Previous attempts to mock artisan this way revealed that the file changed structure just from the Laravel 10 to Laravel 11 update; who knows if something similar would happen when Laravel 11 -> Laravel 12?

Initial plans are to create separate repos that each contain a minimal Laravel app with the intended test cases written into the /tests directory of each app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions