예제 #1
0
파일: PostEvent.php 프로젝트: cobase/cobase
 /**
  * @return Group
  */
 public function getGroup()
 {
     return $this->post->getGroup();
 }
예제 #2
0
파일: PostTest.php 프로젝트: cobase/cobase
 /**
  * @test
  *
  * @group entity
  * @group post-entity
  */
 public function testSettingGroupToAPost()
 {
     $post = new Post();
     $this->assertEquals(sizeof($post->getGroup()), 0, "Initially there are no group in post");
     $group = new Group();
     $group->setTitle("This is a test group");
     $post->setGroup($group);
     $this->assertEquals($post->getGroup()->getTitle(), "This is a test group");
     $this->assertEquals(sizeof($post->getGroup()), 1, "There should be one group in a post");
 }