1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-04-14 12:32:03 +02:00

Added tests

This commit is contained in:
Geoffrey Brier 2012-05-25 16:44:39 +02:00
parent 8f5575cd55
commit 3d5dc35491

@ -15,6 +15,20 @@ class LoremTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($singleParagraph, $provider->text(51));
$this->assertEquals($singleParagraph . "\n" . $singleParagraph, $provider->text(52));
}
public function testWithNegativeParam()
{
$this->assertEquals('', Lorem::sentence(-1));
$this->assertEquals('', Lorem::paragraph(-1));
$this->assertEquals('', Lorem::sentence(0));
$this->assertEquals('', Lorem::paragraph(0));
}
public function testWithStrictlyPositiveParam()
{
$this->assertGreaterThan(1, strlen(Lorem::sentence(1)));
$this->assertGreaterThan(1, strlen(Lorem::paragraph(1)));
}
}
class TestableLorem extends Lorem