/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Integration/Log/LoggingIntegrationTest.php
28 строк
701 B
Luke Kuzmish
[12.x] Do not dispatch `MessageLogged` twice (#56713)
22 авг 2025, 17:22
Не верифицирован
22 авг 2025, 17:22
ddeee72
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Integration\Log; use Illuminate\Log\Events\MessageLogged; use Illuminate\Log\Logger; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Log; use Orchestra\Testbench\TestCase; class LoggingIntegrationTest extends TestCase { public function testLoggingCanBeRunWithoutEncounteringExceptions() { $this->expectNotToPerformAssertions(); Log::info('Hello World'); } public function testCallingLoggerDirectlyDispatchesOneEvent() { Event::fake([MessageLogged::class]); $this->app->make(Logger::class)->debug('my debug message'); Event::assertDispatchedTimes(MessageLogged::class, 1); } }