Ejemplo n.º 1
0
 /**
  * 
  * {@inheritDoc}
  * 
  * @see \Doctrine\Common\DataFixtures\FixtureInterface::load()
  * 
  * @param Doctrine\Common\Persistence\ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     $chromosome1 = new Chromosome();
     $chromosome1->setId(1);
     $chromosome1->setChromosomeSeq('ChromosomeSeqTU1');
     $chromosome1->setChromosomeSource($this->getReference('PublicationTU1'));
     $this->addReference('ChromosomeTU1', $chromosome1);
     $manager->persist($chromosome1);
     $chromosome2 = new Chromosome();
     $chromosome2->setId(2);
     $chromosome2->setChromosomeSeq('ChromosomeSeqTU2');
     $chromosome2->setChromosomeSource($this->getReference('PublicationTU2'));
     $this->addReference('ChromosomeTU2', $chromosome2);
     $manager->persist($chromosome2);
     $manager->flush();
 }
Ejemplo n.º 2
0
 /**
  * Test the setId() method from the Chromosome class
  * 
  * @uses \bcGen\MainBundle\Entity\Chromosome::setId()
  */
 public function testSetId()
 {
     echo "\n********************Test SetId()*********************************************************\n";
     $this->chromosome->setId(2);
     $this->assertEquals(2, $this->chromosome->getId());
 }