Skip to content

Commit

Permalink
Format and improve the tests files
Browse files Browse the repository at this point in the history
Corrected whitespace and formatting issues in test files to improve readability and consistency. Ensured the presence of newlines at the end of files and adjusted indentation where necessary.
  • Loading branch information
renfordt committed Nov 24, 2024
1 parent 8097b9a commit 8bf40a7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion tests/AvatarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use PHPUnit\Framework\TestCase;
use Renfordt\Larvatar\Avatar;
use Renfordt\Larvatar\Name;

/**
* Unit tests for the Avatar class.
*/
Expand Down Expand Up @@ -167,4 +168,4 @@ public function sizeProvider()
[2000000],
];
}
}
}
18 changes: 10 additions & 8 deletions tests/GravatarTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
use PHPUnit\Framework\TestCase;
use Renfordt\Larvatar\Enum\LarvatarTypes;
use Renfordt\Larvatar\Gravatar;
Expand Down Expand Up @@ -98,11 +100,11 @@ public function testSetTypeGravatar(): void

public function testSetTypeMP(): void
{
$gravatar = new Gravatar('user@example.com');
$gravatar->setType(LarvatarTypes::mp);
$this->assertEquals(
'https://www.gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af?d=mp&f=y&s=100',
$gravatar->generateGravatarLink()
);
}
$gravatar = new Gravatar('user@example.com');
$gravatar->setType(LarvatarTypes::mp);
$this->assertEquals(
'https://www.gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af?d=mp&f=y&s=100',
$gravatar->generateGravatarLink()
);
}
}
3 changes: 2 additions & 1 deletion tests/IdenticonTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);
use PHPUnit\Framework\TestCase;
use Renfordt\Larvatar\Identicon;
Expand Down Expand Up @@ -520,4 +521,4 @@ public function testGenerateSymmetricMatrixWithNameHashVariation()
}


}
}
2 changes: 1 addition & 1 deletion tests/Traits/LarvatarTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ public function dataProviderForEncodingVariations(): array
[false],
];
}
}
}

0 comments on commit 8bf40a7

Please sign in to comment.