private function populate()
 {
     $art0 = new Article();
     $art0->setTitle('Blameable Article');
     $this->dm->persist($art0);
     $this->dm->flush();
     $this->dm->clear();
 }
Пример #2
0
 public function testWhenNoUserIsAvailable()
 {
     $sport = new Article();
     $sport->setTitle('sport no user');
     $this->dm->persist($sport);
     $this->dm->flush();
     $this->dm->clear();
     $repo = $this->dm->getRepository(self::ARTICLE);
     $sport = $repo->findOneByTitle('sport no user');
     $this->assertEmpty($sport->getCreated());
     $this->assertEmpty($sport->getUpdated());
 }