public function setUp() { parent::setUp('Newscoop\\Entity\\Issue', 'Newscoop\\Entity\\Section', $this->entity); $this->repository = $this->em->getRepository($this->entity); $this->issue = new \Newscoop\Entity\Issue(1); $this->em->persist($this->issue); $this->section = new \Newscoop\Entity\Section(1, 'test'); $this->em->persist($this->section); $this->template = $this->repository->getTemplate('key'); }
public function testUpdateKey() { $this->markTestIncomplete('Broken'); $templates = $this->repository->findAll(); $this->assertTrue(empty($templates)); $template = $this->repository->getTemplate('new/template'); $id = $template->getId(); $this->repository->updateKey('new/template', 'newtemplate'); $template = $this->repository->findOneBy(array('key' => 'newtemplate')); $this->assertNotEmpty($template); $this->assertEquals($id, $template->getId()); }