You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php$batch = Bus::batch([])->dispatch();
$batch->add([newAnotherJob()]);
// AnotherJob not execute!?>
Is something wrong? Or is it a bug in laravel?
When i comment this line
Bus::fake([SomeJobNeedFake::class]);
all my test is pass.
My test is like this, I ask this to stack-overflow & Discord, but no one have know why this. :(
```php
class ExampleTest extends TestCase
{
public function testBusFake()
{
Bus::fake([NeedFakeJob::class]);
Bus::batch([
new NeedFakeJob(),
new NormalJob(),
])->dispatch();
Bus::assertDispatched(NeedFakeJob::class);
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
Bus::fake single job class will cause Bus::batch not work.
Steps To Reproduce:
Bus::fake([SomeJobNeedFake::class]);
i make a fresh install laravel to reproduce this, could u have time to look? very thx. https://github.com/bolechen/busfake-bug
more info at bolechen/busfake-bug#1
Beta Was this translation helpful? Give feedback.
All reactions