/** * @expectedException \InvalidArgumentException */ public function testSetPlainContentThrowsExceptionWhenContentTooLarge() { $invalidContent = 'a'; // Build a string that's too long for ($loop = 0; $loop <= TemplateVersionDto::MAX_LENGTH_PLAIN_CONTENT; $loop++) { $invalidContent .= 'a'; } $this->assertGreaterThan(TemplateVersionDto::MAX_LENGTH_PLAIN_CONTENT, strlen($invalidContent)); $this->hasTemplateVersionDto(); $this->templateVersionDto->setPlainContent($invalidContent); }