ViewpointDescription now ignores empty lines

This commit is contained in:
Vassyli
2017-09-27 13:17:26 +02:00
parent 829d63d7f6
commit 4b82ee4b89
3 changed files with 29 additions and 1 deletions
+13
View File
@@ -197,4 +197,17 @@ class ViewpointTest extends CoreModelTestCase
$characterScene->addDescriptionParagraph("You enjoy being here.");
$this->assertSame("This is the village.\n\nYou enjoy being here.", $characterScene->getDescription());
}
public function testClearingSceneDescription()
{
$em = $this->getEntityManager();
$testCharacter = $em->getRepository(Character::class)->find(2);
$characterScene = $testCharacter->getViewpoint();
$characterScene->clearDescription();
$this->assertSame("", $characterScene->getDescription());
$characterScene->addDescriptionParagraph("You enjoy being here.");
$this->assertSame("You enjoy being here.", $characterScene->getDescription());
}
}