Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Jul 7, 2017
1 parent 0841a0c commit a2ed8bb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/AvatarPhpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,15 @@ public function it_can_set_font_size()
public function it_can_set_border()
{
$borderSize = 1;
$borderColor = '#ffffff';
$borderColors = ['#ffffff', 'foreground', 'background'];

$avatar = new \Laravolt\Avatar\Avatar();
$avatar->setBorder($borderSize, $borderColor);
foreach ($borderColors as $color) {
$avatar->setBorder($borderSize, $color)->buildAvatar();

$this->assertAttributeEquals($borderSize, 'borderSize', $avatar);
$this->assertAttributeEquals($borderColor, 'borderColor', $avatar);
$this->assertAttributeEquals($borderSize, 'borderSize', $avatar);
$this->assertAttributeEquals($color, 'borderColor', $avatar);
}
}

/**
Expand All @@ -249,7 +251,7 @@ public function it_can_accept_valid_shape()
$avatar = new \Laravolt\Avatar\Avatar();

foreach ($shapes as $shape) {
$avatar->setShape($shape);
$avatar->setShape($shape)->buildAvatar();
$this->assertAttributeEquals($shape, 'shape', $avatar);
}
}
Expand Down

0 comments on commit a2ed8bb

Please sign in to comment.