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)); } }