Пример #1
0
 /**
  * Sets up the required fixtures.
  */
 public function setUp()
 {
     $mockConfig = ['ClassContent' => [], 'Config' => ['bootstrap.yml' => file_get_contents(__DIR__ . '/Config/bootstrap.yml'), 'bundles.yml' => file_get_contents(__DIR__ . '/Config/bundles.yml'), 'config.yml' => file_get_contents(__DIR__ . '/Config/config.yml'), 'doctrine.yml' => file_get_contents(__DIR__ . '/Config/doctrine.yml'), 'logging.yml' => file_get_contents(__DIR__ . '/Config/logging.yml'), 'security.yml' => file_get_contents(__DIR__ . '/Config/security.yml'), 'services.yml' => file_get_contents(__DIR__ . '/Config/services.yml')], 'Ressources' => [], 'cache' => ['Proxies' => [], 'twig' => []]];
     vfsStream::umask(00);
     vfsStream::setup('repositorydir', 0777, $mockConfig);
     $mockApp = new MockBBApplication(null, null, false, $mockConfig, __DIR__ . '/../vendor');
     $this->bundle = $mockApp->getBundle('theme');
 }
Пример #2
0
 /**
  * Creates an instance of TestKernel and initialize application's autoloader.
  */
 private function __construct()
 {
     $this->app = new MockBBApplication(null, 'test');
     $this->app->getAutoloader()->register()->registerNamespace('BackBee\\ClassContent\\Element', $this->buildPath([$this->getApplication()->getBBDir(), 'ClassContent', 'Element']));
 }