l3pp4rd/DoctrineExtensions — pull request #655 by graanday (2013-04-02 14:22:08+00:00)
Title: MyInheritenceTest

addEventSubscriber(new SluggableListener);

$this->getMockSqliteEntityManager($evm);
}

public function testSlugGeneration()
{
$tab =array();
$audi = new Car;
$audi->setDescription('audi car');
$audi->setTitle('Audi');

$this->em->persist($audi);

$audi2 = new Car;
$audi2->setDescription('audi2 car');
$audi2->setTitle('Audi');

$this->em->persist($audi2);

$audi3 = new Batmobile;
$audi3->setTitle('Audi');

$this->em->persist($audi3);

$audi4 = new Car;
$audi4->setDescription('audi4 car');
$audi4->setTitle('Audi');

$this->em->persist($audi4);

$audi5 = new Batmobile;
$audi5->setTitle('Audi');
$audi5->setDescription('audi5 car');

$this->em->persist($audi5);

$audi6 = new Car;
$audi6->setDescription('audi6 car');
$audi6->setTitle('Audi');

$this->em->persist($audi6);

$this->em->flush();
$tab[] = $audi->getSlug();
$tab[] = $audi2->getSlug();
$tab[] = $audi3->getSlug();
$tab[] = $audi4->getSlug();
$tab[] = $audi5->getSlug();
$tab[] = $audi6->getSlug();

var_dump($tab);

}

protected function getUsedEntityFixtures()
{
return array(
self::VEHICLE,
self::CAR,
self::BATMOBILE
);
}
}