/** * @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(); }
public function testPersist() { $this->repository->expects($this->once())->method('persist')->with($this->equalTo($this->document)); $this->sut->persist($this->document); }