/** * @covers ::refineContextDefinitions */ public function testRefiningContextDefinitions() { $this->action->setContextValue('type', 'entity_test'); $this->action->refineContextdefinitions(); $this->assertEquals($this->action->getProvidedContextDefinition('entity_fetched')->getDataType(), 'entity:entity_test'); }
/** * Tests the context refining. * * @covers ::refineContextDefinitions */ public function testRefiningContextDefinitions() { $this->action->setContextValue('bundle', 'bundle_test'); $this->action->refineContextDefinitions([]); $this->assertEquals($this->action->getProvidedContextDefinition('entity')->getDataType(), 'entity:test:bundle_test'); }