From 6ee5abaeb5163bd17493e5e9d65406800c277076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Barto=C5=A1?= Date: Sun, 29 Oct 2023 01:37:32 +0200 Subject: [PATCH] FormMonitorPanel: render unconditionally --- src/FormMonitor/Tracy/FormMonitorPanel.php | 8 -------- .../Tracy/FormMonitorPanelTest.php | 20 ------------------- 2 files changed, 28 deletions(-) diff --git a/src/FormMonitor/Tracy/FormMonitorPanel.php b/src/FormMonitor/Tracy/FormMonitorPanel.php index d01fd65..86ae782 100644 --- a/src/FormMonitor/Tracy/FormMonitorPanel.php +++ b/src/FormMonitor/Tracy/FormMonitorPanel.php @@ -28,10 +28,6 @@ public function getTab(): string $errors = $this->getErrors(); // phpcs:enable - if ($errors === []) { - return; - } - require __DIR__ . '/FormMonitor.tab.phtml'; }); } @@ -44,10 +40,6 @@ public function getPanel(): string $errors = $this->getErrors(); // phpcs:enable - if ($errors === []) { - return; - } - require __DIR__ . '/FormMonitor.panel.phtml'; }); } diff --git a/tests/Unit/FormMonitor/Tracy/FormMonitorPanelTest.php b/tests/Unit/FormMonitor/Tracy/FormMonitorPanelTest.php index 4c57d96..cd6c967 100644 --- a/tests/Unit/FormMonitor/Tracy/FormMonitorPanelTest.php +++ b/tests/Unit/FormMonitor/Tracy/FormMonitorPanelTest.php @@ -10,26 +10,6 @@ final class FormMonitorPanelTest extends TestCase { - public function testNoRender(): void - { - $form = new Form(); - - $stack = new FormStack(); - $stack->add($form); - - $panel = new FormMonitorPanel($stack); - - self::assertSame( - '', - $panel->getPanel(), - ); - - self::assertSame( - '', - $panel->getTab(), - ); - } - public function testRender(): void { $form = new Form();