A free open source IT asset/license management system
Updated risky test
snipe225fa61a24da
diff --git a/tests/Feature/Livewire/SlackSettingsFormAuthorizationTest.php b/tests/Feature/Livewire/SlackSettingsFormAuthorizationTest.phpindex b3bf94d52e..8c029e2d14 100644--- a/tests/Feature/Livewire/SlackSettingsFormAuthorizationTest.php+++ b/tests/Feature/Livewire/SlackSettingsFormAuthorizationTest.php@@ -21,8 +21,20 @@ class SlackSettingsFormAuthorizationTest extends TestCase{$this->actingAs(User::factory()->superuser()->create());+ $initialObLevel = ob_get_level();+Livewire::test(SlackSettingsForm::class)->assertStatus(200);++ // The slack-settings-form view opens @section('content') at line 13+ // but never closes it in-file. In production, the parent+ // settings/slack.blade.php's trailing @stop closes the section.+ // Livewire::test() renders the component in isolation, so the+ // section's output buffer stays open and PHPUnit flags the test+ // as risky. Drain any buffers opened during render.+ while (ob_get_level() > $initialObLevel) {+ ob_end_clean();+ }}public function test_non_superuser_cannot_mount_or_replay()