/**
  * Test fake mapping
  *
  * @expectedException \Mmoreram\ControllerExtraBundle\Exceptions\EntityNotFoundException
  */
 public function testMappingManyFailAnnotation()
 {
     $fake = FakeFactory::create();
     $fake->setField('value2');
     $entityManager = static::$kernel->getContainer()->get('doctrine')->getManagerForClass('Mmoreram\\ControllerExtraBundle\\Tests\\FakeBundle\\Entity\\Fake');
     $entityManager->persist($fake);
     $entityManager->flush();
     $this->client->request('GET', '/fake/entity/mapped/many/1');
     $this->assertEquals('{"id":1}', $this->client->getResponse()->getContent());
 }
 /**
  * Test paginator simple
  */
 public function testPaginatorWithLikeWithGetParameterAnnotation()
 {
     $fake = FakeFactory::create();
     $fake->setField('we are doing a test from paginator');
     $entityManager = static::$kernel->getContainer()->get('doctrine')->getManagerForClass('Mmoreram\\ControllerExtraBundle\\Tests\\FakeBundle\\Entity\\Fake');
     $entityManager->persist($fake);
     $entityManager->flush();
     $this->client->request('GET', '/fake/paginator/likewithgetparameter?search=test');
     $this->assertEquals('{"count":1}', $this->client->getResponse()->getContent());
 }
 /**
  * Returns a new Fake instance
  *
  * @return Fake Fake entity
  */
 public function generateNonStatic()
 {
     return FakeFactory::create();
 }