Example #1
0
 /**
  * This test doesn't assert anything as it simply checks that the
  * non-presence of override directories is handled gracefully.
  */
 public function testNonExistantOverrideDirectoriesGetIgnored()
 {
     vfsStream::setup('config');
     vfsStream::newDirectory('dev')->at(vfsStreamWrapper::getRoot());
     $env = new FauxEnvironment();
     $env->set('dev');
     $env->setInstallation('dev6');
     $loader = new Loader(vfsStream::url('config'), $env);
     $registry = new NonLoadingRegistry($loader);
     $loader->load($registry);
     $this->assertTrue(true);
 }
Example #2
0
 public function testSavingToCache()
 {
     $dir = realpath(__DIR__) . '/fixtures';
     $cache = new \Message\Cog\Cache\Instance(new FauxCache());
     $env = new FauxEnvironment();
     $loader = new LoaderCache($dir, $env, $cache);
     $registry = new NonLoadingRegistry($loader);
     $expected = (include 'expected_groups.php');
     $env->set('live');
     $env->setInstallation('server6');
     $loader->load($registry);
     $this->assertEquals($cache->fetch($loader->getCacheKey()), $expected);
 }