/** * * {@inheritDoc} * * @see \Doctrine\Common\DataFixtures\FixtureInterface::load() * * @param Doctrine\Common\Persistence\ObjectManager $manager * */ public function load(ObjectManager $manager) { $publicationTU1 = new Publication(); $publicationTU1->setPubHref('URLTU1'); $publicationTU1->setSourceAuthor('AuthorTU1'); $publicationTU1->setSourceTitle('TitleTU1'); $publicationTU1->setSourceYear(new \DateTime()); $manager->persist($publicationTU1); $this->addReference('PublicationTU1', $publicationTU1); $publicationTU2 = new Publication(); $publicationTU2->setPubHref('URLTU2'); $publicationTU2->setSourceAuthor('AuthorTU2'); $publicationTU2->setSourceTitle('TitleTU2'); $publicationTU2->setSourceYear(new \DateTime()); $manager->persist($publicationTU2); $this->addReference('PublicationTU2', $publicationTU2); $manager->flush(); }
/** * Test the setPubHref() method from the Publication class * * @uses \bcGen\MainBundle\Entity\Publication::setPubHref() */ public function testSetPubHref() { echo "\n********************Test SetPubHref()*******************************************************\n"; $this->publication->setPubHref('setPubHref'); $this->assertEquals('setPubHref', $this->publication->getPubHref()); }