Skip to content

Commit

Permalink
Added missing tests for the Color Provider.
Browse files Browse the repository at this point in the history
  • Loading branch information
bessl committed Sep 6, 2014
1 parent 4c3e635 commit 5e0a668
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/Faker/Provider/ColorTest.php
Original file line number Diff line number Diff line change
@@ -12,6 +12,11 @@ public function testHexColor()
$this->assertRegExp('/^#[a-f0-9]{6}$/i', Color::hexColor());
}

public function testSafeHexColor()
{
$this->assertRegExp('/^#[a-f0-9]{6}$/i', Color::safeHexColor());
}

public function testRgbColorAsArray()
{
$this->assertEquals(3, count(Color::rgbColorAsArray()));
@@ -29,4 +34,13 @@ public function testRgbCssColor()
$this->assertRegExp('/^rgb\(' . $regexp . ',' . $regexp . ',' . $regexp . '\)$/i', Color::rgbCssColor());
}

public function testSafeColorName()
{
$this->assertRegExp('/^[\w]+$/', Color::safeColorName());
}

public function testColorName()
{
$this->assertRegExp('/^[\w]+$/', Color::colorName());
}
}

0 comments on commit 5e0a668

Please sign in to comment.