Files
timebank-cc-public/tests/Feature/LivewireCorruptPayloadNotReportedTest.php
T

19 lines
572 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Livewire\Mechanisms\HandleComponents\CorruptComponentPayloadException;
use Tests\TestCase;
class LivewireCorruptPayloadNotReportedTest extends TestCase
{
public function test_corrupt_livewire_payloads_are_not_reported(): void
{
$handler = $this->app->make(ExceptionHandler::class);
$this->assertFalse($handler->shouldReport(new CorruptComponentPayloadException));
$this->assertTrue($handler->shouldReport(new \RuntimeException('real error')));
}
}