Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions tests/Integration/View/IconComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@
);
}

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: '<svg></svg>'));

$this->container->register(HttpClient::class, fn () => $mockHttpClient);

$this->assertSame(

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - sqlite - prefer-stable - ubuntu-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - sqlite - prefer-lowest - ubuntu-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - postgres - prefer-lowest - windows-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - mysql - prefer-lowest - ubuntu-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - sqlite - prefer-lowest - windows-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - postgres - prefer-stable - ubuntu-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - postgres - prefer-stable - windows-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - postgres - prefer-lowest - ubuntu-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - mysql - prefer-stable - windows-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - mysql - prefer-stable - ubuntu-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - sqlite - prefer-stable - windows-latest

Failed asserting that two strings are identical.

Check failure on line 57 in tests/Integration/View/IconComponentTest.php

View workflow job for this annotation

GitHub Actions / Run tests: PHP 8.4 - mysql - prefer-lowest - windows-latest

Failed asserting that two strings are identical.
'<svg></svg>',
$this->render(
'<x-icon :name="$eyeIcon" />',
eyeIcon: 'ph:eye',
),
);
}

public function test_it_downloads_the_icon_from_a_custom_api(): void
{
$mockHttpClient = $this->createMock(HttpClient::class);
Expand Down
Loading