diff --git a/tests/Integration/View/IconComponentTest.php b/tests/Integration/View/IconComponentTest.php index 43f244261..d32d956da 100644 --- a/tests/Integration/View/IconComponentTest.php +++ b/tests/Integration/View/IconComponentTest.php @@ -43,6 +43,26 @@ public function test_it_renders_an_icon(): void ); } + public function test_it_renders_an_icon_from_a_string_variable(): void + { + $mockHttpClient = $this->createMock(HttpClient::class); + $mockHttpClient + ->expects($this->once()) + ->method('get') + ->with('https://api.iconify.design/ph/eye.svg') + ->willReturn(new GenericResponse(status: Status::OK, body: '')); + + $this->container->register(HttpClient::class, fn () => $mockHttpClient); + + $this->assertSame( + '', + $this->render( + '', + eyeIcon: 'ph:eye', + ), + ); + } + public function test_it_downloads_the_icon_from_a_custom_api(): void { $mockHttpClient = $this->createMock(HttpClient::class);