Esempio n. 1
0
 public function testSetGetPrivilegedAccess()
 {
     $context = new Context();
     $this->assertFalse($context->getPrivilegedAccess());
     $context->setPrivilegedAccess(true);
     $this->assertTrue($context->getPrivilegedAccess());
 }
 /**
  * Return Context to store a global selected repository ref (Or the master)
  * @param  ServiceLocatorInterface $serviceLocator
  * @return Context
  * @throws \RuntimeException
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $api = $serviceLocator->get('Prismic\\Api');
     $context = new Context();
     $context->setPrismicApi($api);
     return $context;
 }