fupa's avatar

fupa wrote a reply+100 XP

6mos ago

I’ve noticed that calling $this->artisan(...) actually runs the command, which makes it difficult to mock or isolate in tests. For example, if the Artisan command is something like dumping the database schema, running the test will still execute it for the real project environment if $this->artisan(...) is used. Do you know of another way to handle this scenario?