I need to change locale in my functional test: <?php namespace App\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class Translati
1) App\Tests\Controller\Admin\Api\Promotion\PromotionDeleteControllerTest::test_deleting_promotion LogicException: The first argument of "Symfony\Bundle\Framewo
Using Symfony 5.2 and PhpUnit last version, I have this error with my functional test LogicException: You cannot create the client used in functional tests if t
Using php 8.0.2 and Laravel 8.37.0, I am running tests where for every test the database data should be refreshed, since there is conflicting data per test (due
I have to test the routes of a controller which uses Guzzle Wrapper as a client to get data from an API. The app uses Laravel as a framework. This is the part o
The answer is probably very simple, but I've been running around in circles and I can't find an answer anywhere. I'm trying to mock a final class which is norma
Am using Laravel Passport to build an API, I removed the web routes and its guard accordingly How can I test user logout? This is what I have so far: Lo
I have run my laravel app with phpunit. Everything is fine until at some point when I run my test again turns out with this error. Illuminate\Database\QueryExce
everybody! I've finished a laravel project backend with postgres and it has a phpunit tests, everything it works. So, I did upload to Github. When I did "git
I used Symfony 5.2 and I need to mock service method which execute send request to stripe payment system, obviously don't need to execute it when tests executin
I used Symfony 5.2 and I need to mock service method which execute send request to stripe payment system, obviously don't need to execute it when tests executin
when I try to run my unit tests, I get this error PHP Warning: PHP Startup: Unable to load dynamic library 'bz2' (tried: \xampp\php\ext\bz2 (The specifie
firstly I was receiving a warning and a fatal error. The warning: Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue
I have this code: public function method(){ //... if(!$exist) { throw new \InvalidArgumentException('Ce client inexistant', 400); } } I do the UT
I tried find solution to my issue but didn't find anything. I use: Symfony, Doctrine, PhpUnit I have one entity class InvoiceNumerator: /** * InvoiceNumerat
I'm trying to test methods which requires Sessions in my PHPUnit WebTestCase, with no success. PHP 8.0, Symfony 5.4 Here's my code: When user log-in, I'm saving
I'm trying to make CI pipeline and run phpunit tests via GitHub actions. First of all: tests work fine on my local machine (mac os). Then, when I do git push my
I'm writing tests and I want to assert, that a returned collection has some specific structure. For asserting jsons I'm using assertJsonStructure() method on
I created a simple test for my new Laravel 7 application. But when I run php artisan test I get the following error. Target [Illuminate\Contracts\View\Factory]
I keep getting status 500 when 200 is expected. These are the files: ExampleTest.php namespace Tests\Feature; use Tests\TestCase; use Illuminate\Foundation\T