/**
  * @test
  * @testdox Content is added to contexts
  */
 public function dataRepositoryAddsContentToContexts()
 {
     $contexts = [$a = new RegionContext('some-id-a', null, null), $b = new RegionContext('some-id-b', null, null), $c = new RegionContext('some-id-c', null, null)];
     $dataRepository = new DevelopmentLoader();
     $dataRepository->batch($contexts);
     $this->assertEquals('some-id-a-data', $a->getData());
     $this->assertEquals('some-id-b-data', $b->getData());
     $this->assertEquals('some-id-c-data', $c->getData());
 }
 /**
  * @param RegionContext $context
  */
 protected function loadRegionContext(RegionContext $context)
 {
     $loader = $this->getLoader($context->getLoaderIdentity());
     $loader->single($context);
 }
 /**
  * {@inheritdoc}
  */
 public function single(RegionContext $context)
 {
     $context->setData(sprintf('%s-data', $context->getIdentity()));
 }
 /**
  * {@inheritdoc}
  */
 public function render(RegionContext $context)
 {
     return self::decorate($context->getData());
 }
 /**
  * @test
  * @testdox Can contain content
  */
 public function contextCanStoreContextData()
 {
     $context = new RegionContext('some-id', 'default', 'default');
     $context->setData('some-data');
     $this->assertEquals('some-data', $context->getData());
 }
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     $this->context = new RegionContext('some-id', null, null);
     $this->context->setData('some-id-data');
 }