コード例 #1
0
 /**
  * @test
  */
 public function initialize()
 {
     $this->collection->drop();
     $this->assertCount(0, $this->collection->find());
     $this->addUserFixture('kirk');
     $this->addUserFixture('spock');
     $this->logIn('kirk');
     $pub = $this->contentRepo->create('small');
     $pub->setMessage('message' . static::$random);
     $this->contentRepo->persist($pub);
     return $pub->getId();
 }
コード例 #2
0
 public function testCreate()
 {
     $pub = $this->sut->create('message');
     $this->assertEquals($this->author, $pub->getAuthor());
     $this->assertInstanceOf('Trismegiste\\Socialist\\Publishing', $pub);
 }