python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
I'm having problems using factory to test in laravel
i am using DatabaseTransactions in test class
class CorreioApiTest extends TestCase
{
use DatabaseTransactions;
this is my test code,
$user = User::where('email', env('SETUP_USER_EMAIL'))->...

Leandro Oliveira
Votes: 0
Answers: 1
PHPUnit "Unknown option "--configuration" Process finished with exit code 1" in PhpStorm
I am able to execute unit tests in the CLI using the following command:
/usr/local/Cellar/php@7.4/7.4.27/bin/php /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/vendor/phpunit/phpunit/phpunit /Users/U...

MyNameIsLinuxx
Votes: 0
Answers: 0
Replace all class instances with stub
I am testing a class, let's call it ClassUnderTest using another class, let's call it OtherClass. In my Test I do:
$OtherClassStub = $this->createStub(OtherClass::class);
$OtherClassStub->method...

Paflow
Votes: 0
Answers: 2
Testing a batch creating job
I'm trying to test that a job is batching the correct number of another job like so
Bus::fake();
...
(new App\Jobs\ProcessChunkOfProducts($this->productsAsChunk()))->handle();
Bus::assertBatched...
damask
Votes: 0
Answers: 0