public function testGetSingleParagraph_noSrand() { $gen = new Generator(); for ($i = 0; $i < 1000; $i++) { $para = $gen->getParagraphs(1); $this->assertTrue($para[0] !== '', "Failed on iteration #{$i}"); } }
public function testToSentence() { $gen = new Generator(); $sentences = $gen->getSentences(64); foreach ($sentences as $sentence) { /** @var string $sentence */ $this->assertRegExp('/^[A-Z][a-z, ]+\\.$/', $sentence, sprintf('Failed to assert "%s" was a valid sentence.', $sentence)); } }