Exemplo 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();
 }
Exemplo n.º 2
0
 /**
  * Test the setChromosomeSeq() method from the Chromosome class
  * 
  * @uses \bcGen\MainBundle\Entity\Chromosome::getChromosomeSeq()
  */
 public function testSetChromosomeSeq()
 {
     echo "\n********************Test SetChromosomeSeq()**********************************************\n";
     $this->chromosome->setChromosomeSeq("setChromosomeSeq");
     $this->assertEquals("setChromosomeSeq", $this->chromosome->getChromosomeSeq("setChromosomeSeq"));
 }