Skip to content

Commit 0f36b21

Browse files
committed
Adding missing tests
1 parent 0c0b636 commit 0f36b21

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/MultiavatarTest.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,23 @@ public function it_will_return_the_same_svg_with_a_numeric_or_string_part(): voi
6161
/** @test */
6262
public function it_will_return_the_same_svg_with_a_case_insensitive_theme(): void
6363
{
64-
$svgLowerTheme = ($this->multiavatar)('foobar', ['ver' => ['theme' => 'a']]);
65-
$svgUpperTheme = ($this->multiavatar)('foobar', ['ver' => ['theme' => 'A']]);
64+
$svgLowerTheme = ($this->multiavatar)('foobar', ['ver' => ['part' => 5, 'theme' => 'A']]);
65+
$svgUpperTheme = ($this->multiavatar)('foobar', ['ver' => ['part' => '05', 'theme' => 'a']]);
6666

6767
self::assertSame($svgLowerTheme, $svgUpperTheme);
6868
}
6969

70+
/** @test */
71+
public function it_will_return_the_same_svg_if_the_ver_is_fully_setting_independently_of_the_avatar_id_value(): void
72+
{
73+
$options = ['ver' => ['theme' => 'A', 'part' => 3]];
74+
75+
$svgWithFixedVer1 = ($this->multiavatar)('first-avatar', $options);
76+
$svgWithFixedVer2 = ($this->multiavatar)('second-avatar', $options);
77+
78+
self::assertSame($svgWithFixedVer1, $svgWithFixedVer2);
79+
}
80+
7081
/** @test */
7182
public function it_will_return_the_same_svg_with_sans_env_truthy_values(): void
7283
{
@@ -98,6 +109,15 @@ public function it_will_return_different_svg_with_sans_env_values(): void
98109
self::assertNotSame($svgSansEnvFalse, $svgSansEnvTrue);
99110
}
100111

112+
/** @test */
113+
public function it_will_return_the_same_svg_with_avatar_id_numeric_or_string(): void
114+
{
115+
$svgAvatarIdIsString = ($this->multiavatar)('1234567890');
116+
$svgAvatarIdIsNumeric = ($this->multiavatar)(1234567890);
117+
118+
self::assertSame($svgAvatarIdIsNumeric, $svgAvatarIdIsString);
119+
}
120+
101121
/**
102122
* @test
103123
* @dataProvider getEmptySvgProvider

0 commit comments

Comments
 (0)