Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Feb 9, 2022
1 parent 09bbb2d commit f9a3e61
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/AvatarPhpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function it_can_generate_circle_svg()
{
$expected = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">';
$expected .= '<circle cx="50" cy="50" r="45" stroke="yellow" stroke-width="10" fill="red" />';
$expected .= '<text x="50" y="50" font-size="24" fill="white" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '<text font-size="24" fill="white" x="50%" y="50%" dy=".1em" style="line-height:1" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '</svg>';

$avatar = new \Laravolt\Avatar\Avatar();
Expand All @@ -267,7 +267,7 @@ public function it_can_generate_rectangle_svg()
{
$expected = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">';
$expected .= '<rect x="5" y="5" width="90" height="90" stroke="yellow" stroke-width="10" rx="15" fill="red" />';
$expected .= '<text x="50" y="50" font-size="24" fill="white" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '<text font-size="24" fill="white" x="50%" y="50%" dy=".1em" style="line-height:1" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '</svg>';

$avatar = new \Laravolt\Avatar\Avatar();
Expand All @@ -291,7 +291,7 @@ public function it_can_generate_svg_with_custom_font_family()
{
$expected = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">';
$expected .= '<circle cx="50" cy="50" r="45" stroke="yellow" stroke-width="10" fill="red" />';
$expected .= '<text x="50" y="50" font-size="24" font-family="Lato" fill="white" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '<text font-size="24" font-family="Lato" fill="white" x="50%" y="50%" dy=".1em" style="line-height:1" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '</svg>';

$avatar = new \Laravolt\Avatar\Avatar();
Expand All @@ -315,7 +315,7 @@ public function it_can_use_the_foreground_color_for_the_svg_border()
{
$expected = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">';
$expected .= '<circle cx="50" cy="50" r="45" stroke="green" stroke-width="10" fill="red" />';
$expected .= '<text x="50" y="50" font-size="24" fill="green" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '<text font-size="24" fill="green" x="50%" y="50%" dy=".1em" style="line-height:1" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '</svg>';

$avatar = new \Laravolt\Avatar\Avatar(['border' => ['size' => 10, 'color' => 'foreground']]);
Expand All @@ -337,7 +337,7 @@ public function it_can_use_the_background_color_for_the_svg_border()
{
$expected = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">';
$expected .= '<circle cx="50" cy="50" r="45" stroke="red" stroke-width="10" fill="red" />';
$expected .= '<text x="50" y="50" font-size="24" fill="green" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '<text font-size="24" fill="green" x="50%" y="50%" dy=".1em" style="line-height:1" alignment-baseline="middle" text-anchor="middle" dominant-baseline="central">AB</text>';
$expected .= '</svg>';

$avatar = new \Laravolt\Avatar\Avatar(['border' => ['size' => 10, 'color' => 'background']]);
Expand Down

0 comments on commit f9a3e61

Please sign in to comment.