addEventSubscriber(new SluggableListener); $this->getMockSqliteEntityManager($evm); } /** * @test */ function testPrefix() { $foo = new Prefix(); $foo->setTitle('Bar'); $this->em->persist($foo); $this->em->flush(); $this->assertEquals('test-bar', $foo->getSlug()); } /** * @test */ function testSuffix() { $foo = new Suffix(); $foo->setTitle('Bar'); $this->em->persist($foo); $this->em->flush(); $this->assertEquals('bar.test', $foo->getSlug()); } /** * Get a list of used fixture classes * * @return array */ protected function getUsedEntityFixtures() { return array( self::SUFFIX, self::PREFIX, ); } }