示例#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();
 }
示例#2
0
 /**
  * Test the setChromosomeSource() method from the Chromosome class
  * 
  * @uses \bcGen\MainBundle\Entity\Chromosome::setChromosomeSource()
  * @uses \bcGen\MainBundle\Entity\Source Class Source
  */
 public function testSetChromosomeSource()
 {
     echo "\n********************Test SetChromosomeSource()*******************************************\n";
     $this->chromosome->setChromosomeSource($this->publication);
     $this->assertFalse(empty($this->chromosome->getChromosomeSource()));
 }