예제 #1
0
파일: PostTest.php 프로젝트: cobase/cobase
 /**
  * @test
  *
  * @group entity
  * @group post-entity
  */
 public function assertFeedTitleIsShortenedProperlyWhenLastCharIsSpace()
 {
     $user = new User();
     $user->setName("John");
     $post = new Post();
     $post->setUser($user);
     $post->setMaxFeedTitleLength(21);
     $post->setContent('The hyperactive horse walked into a saloon');
     $expectedTitle = 'The hyperactive horse... (John)';
     $this->assertEquals($expectedTitle, $post->getFeedItemTitle());
 }