public function createApplication()
 {
     $app = CRUDTestDBSetup::createAppAndDB();
     $app->register(new Silex\Provider\SessionServiceProvider());
     $app['session.test'] = true;
     $app['debug'] = true;
     $app['exception_handler']->disable();
     $this->fileProcessor = new CRUDNullFileProcessor();
     $dataFactory = new CRUDlex\CRUDMySQLDataFactory($app['db']);
     $app->register(new CRUDlex\CRUDServiceProvider(), array('crud.file' => __DIR__ . '/../crud.yml', 'crud.datafactory' => $dataFactory, 'crud.fileprocessor' => $this->fileProcessor));
     $app->register(new Silex\Provider\UrlGeneratorServiceProvider());
     $app->register(new Silex\Provider\TwigServiceProvider(), array('twig.path' => __DIR__ . '/../views'));
     $app->mount('/crud', new CRUDlex\CRUDControllerProvider());
     $this->dataBook = $app['crud']->getData('book');
     $this->dataLibrary = $app['crud']->getData('library');
     return $app;
 }