/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Integration/Queue/QueueDelayTest.php
54 строки
961 B
Lucas Michot
Move Testbench-based tests to tests/Integration (#61080)
07 авг 2026, 16:42
Не верифицирован
07 авг 2026, 16:42
486d136
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Integration\Queue; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Support\Facades\Queue; use Orchestra\Testbench\TestCase; class QueueDelayTest extends TestCase { public function test_queue_delay() { Queue::fake(); $job = new TestJob; dispatch($job); $this->assertEquals(60, $job->delay); } public function test_queue_without_delay() { Queue::fake(); $job = new TestJob; dispatch($job->withoutDelay()); $this->assertEquals(0, $job->delay); } public function test_pending_dispatch_without_delay() { Queue::fake(); $job = new TestJob; dispatch($job)->withoutDelay(); $this->assertEquals(0, $job->delay); } } class TestJob implements ShouldQueue { use Queueable; public function __construct() { $this->delay(60); } }