I have this exercice folder that gave me instructions on how to install the web application: So this folder contains a .sh file that installs the necessary things: npm install curl -o phpunit -L https:…
I have this exercice folder that gave me instructions on how to install the web application: So this folder contains a .sh file that installs the necessary things: npm install curl -o phpunit -L https:…
I have a laravel app with passport installed to manage api auth. I’m trying to write some tests but I’m unable to create a Client as per the docs on laravel. I’ve googled similar SO answers but they …
I’m trying to test my Exception, or any other exception in PHP Unit. <?php declare(strict_types=1); namespace TestsException; use PHPUnitFrameworkTestCase; class DrinkIsInvalidExceptionTest …
In case if you need to test PHP application error handlers, you have to “mock” or just disable sending errors on remote servers in the Sentry client. What is the right way to do this?
I have a class FillUserPaymentStatisticService with methods: public function fillStatisticForAllTime(): void { $firstDate = DateTime::createFromFormat(‘Y-m-d H:i:s’, $this->…
Is there any way to run PHPUnit test case without SIMPLETEST_BASE_URL. I need to perform PHPUnit in an environment where only PHP cli is availabe. So can’t put any url on SIMPLETEST_BASE_URL in …
I am trying to do a GET request to retrieve a specific film via the id /GET ‘film/{id}’ etc film_table — id — description this is what is part of the response, what if I’ve many-to-many …
I have setup Xdebug remote debugging with the following configuration: I placed a breakpoint in my phpunit test:
I have 2 directories, multiple files, basically text formats. They should be equal. I need to know what files are missing/extra (diff will). What method should I use?
I have written an action which create a temporary file and returned it with a BinaryFileResponse and delete it after. Something like this : $response = new BinaryFileResponse($this->getFile($…