protected function setUp()
 {
     $this->context = new ConfigContext();
     $this->context->setClassName(self::TEST_CLASS_NAME);
     $this->context->setVersion(self::TEST_VERSION);
     $this->context->setRequestType(self::TEST_REQUEST_TYPE);
 }
Beispiel #2
0
 public function testSorters()
 {
     $this->assertFalse($this->context->hasSorters());
     $this->assertNull($this->context->getSorters());
     $sorters = ConfigUtil::getInitialConfig();
     $this->context->setSorters($sorters);
     $this->assertTrue($this->context->hasSorters());
     $this->assertEquals($sorters, $this->context->getSorters());
     $this->assertEquals($sorters, $this->context->get(SortersConfigExtra::NAME));
     $this->context->setSorters(null);
     $this->assertTrue($this->context->hasSorters());
 }
Beispiel #3
0
 /**
  * {@inheritdoc}
  */
 public function configureContext(ConfigContext $context)
 {
     $context->set($this->name, true);
 }
 /**
  * {@inheritdoc}
  */
 public function configureContext(ConfigContext $context)
 {
     $context->set(self::NAME, $this->expandedEntities);
 }
 /**
  * @param ConfigContext $context
  *
  * @return CustomizeDataItemContext
  */
 protected function createCustomizationContext(ConfigContext $context)
 {
     /** @var CustomizeDataItemContext $customizationContext */
     $customizationContext = $this->customizationProcessor->createContext();
     $customizationContext->setVersion($context->getVersion());
     $customizationContext->setRequestType($context->getRequestType());
     return $customizationContext;
 }
 /**
  * {@inheritdoc}
  */
 public function configureContext(ConfigContext $context)
 {
     $context->setMaxRelatedEntities($this->maxRelatedEntities);
 }