public function setUp()
 {
     $appConfig = (include __DIR__ . '/../../../test.application.config.php');
     $appConfig['module_listener_options']['config_glob_paths'][] = __DIR__ . '/../../../test.module.perrequest.config.php';
     $this->setApplicationConfig($appConfig);
     parent::setUp();
     $this->documentManager = $this->getApplicationServiceLocator()->get('doctrine.odm.documentmanager.default');
     static::$staticDcumentManager = $this->documentManager;
     if (!static::$dbDataCreated) {
         //Create data in the db to query against
         TestData::create($this->documentManager);
         static::$dbDataCreated = true;
     }
 }
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../../../test.application.config.php');
     parent::setUp();
     $this->documentManager = $this->getApplicationServiceLocator()->get('doctrine.odm.documentmanager.default');
     static::$staticDcumentManager = $this->documentManager;
     if (!static::$dbDataCreated) {
         //Create data in the db to query against
         TestData::create($this->documentManager);
         static::$dbDataCreated = true;
     }
     //ensure that all tests start in a logged out state
     $this->getApplicationServiceLocator()->get('Zend\\Authentication\\AuthenticationService')->logout();
 }