function ContextTest::testSetContextValueTypedData
@covers ::setContextValue
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ Context/ ContextTest.php, line 89
Class
- ContextTest
- @coversDefaultClass \Drupal\Core\Plugin\Context\Context[[api-linebreak]] @group Plugin
Namespace
Drupal\Tests\Core\Plugin\ContextCode
public function testSetContextValueTypedData() {
$this->contextDefinition = $this->getMockBuilder('Drupal\\Core\\Plugin\\Context\\ContextDefinitionInterface')
->setMethods([
'getDefaultValue',
'getDataDefinition',
])
->getMockForAbstractClass();
$typed_data = $this->createMock('Drupal\\Core\\TypedData\\TypedDataInterface');
$context = new Context($this->contextDefinition, $typed_data);
$this->assertSame($typed_data, $context->getContextData());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.