public function getAdditionalSession($credentials = false)
 {
     if (!$this->multiWorkspaceSupported) {
         return null;
     }
     return parent::getAdditionalSession($credentials);
 }
示例#2
0
 /**
  * we use this place to fetch a session and possibly load fixtures.
  *
  * this speeds up the tests considerably as fixture loading can be
  * quite expensive
  *
  * @param string $fixtures the fixtures name to import, defaults to
  *      general/base. if you want to load fixtures yourself, send false
  *
  * @see initProperties()
  */
 public static function setupBeforeClass($fixtures = 'general/base')
 {
     self::$loader = \ImplementationLoader::getInstance();
     $fqn = get_called_class();
     list($phpcr, $tests, $chapter, $case) = explode('\\', $fqn);
     $case = "{$chapter}\\{$case}";
     if (!self::$loader->getTestSupported($chapter, $case, null)) {
         throw new \PHPUnit_Framework_SkippedTestSuiteError('Test case not supported by this implementation');
     }
     self::$staticSharedFixture = array();
     date_default_timezone_set('Europe/Zurich');
     //TODO put this here?
     self::$staticSharedFixture['ie'] = self::$loader->getFixtureLoader();
     if ($fixtures) {
         self::$staticSharedFixture['ie']->import($fixtures);
     }
     // only load sessions once fixtures have been imported (relevant i.e. for jackalope-doctrine-dbal)
     self::$staticSharedFixture['session'] = self::$loader->getSession();
     self::$staticSharedFixture['additionalSession'] = self::$loader->getAdditionalSession();
 }