Ejemplo n.º 1
0
 /**
  * @test
  * @expectedException Gedmo\Exception\InvalidMappingException
  */
 public function shouldThrowAnExceptionWhenMappedSuperclassProtectedProperty()
 {
     $evm = new EventManager();
     $evm->addEventSubscriber(new SluggableListener());
     $this->getMockSqliteEntityManager($evm);
     $audi = new Car();
     $audi->setDescription('audi car');
     $audi->setTitle('Audi');
     $this->em->persist($audi);
     $this->em->flush();
 }
Ejemplo n.º 2
0
 public function testSlugGeneration()
 {
     $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);
     $this->em->flush();
 }