Getting coverage to 100% on these classes

Also found a bug in the Form class that would bork phone numbers with dashes in
them. Even though the Form class is going to go away eventually I wanted to fix
the issue.
This commit is contained in:
Joshua Sherman 2014-01-12 13:56:52 -05:00
parent 5ef3b58f53
commit faaefc1b82
6 changed files with 164 additions and 11 deletions

View file

@ -69,6 +69,11 @@ class StringTest extends PHPUnit_Framework_TestCase
$this->assertEquals(preg_match('/[a-z0-9]/', String::random(32, false, false)), 0);
}
public function testRandomSimilarFalse()
{
$this->assertRegExp('/[a-hj-np-z2-9]{8}/', String::random(8, true, true, false));
}
/**
* @dataProvider providerTruncate
*/