function ContextTest::testSetContextValueTypedData

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php \Drupal\Tests\Core\Plugin\Context\ContextTest::testSetContextValueTypedData()
  2. 8.9.x core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php \Drupal\Tests\Core\Plugin\Context\ContextTest::testSetContextValueTypedData()
  3. 11.x core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php \Drupal\Tests\Core\Plugin\Context\ContextTest::testSetContextValueTypedData()

@covers ::setContextValue

File

core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php, line 86

Class

ContextTest
@coversDefaultClass \Drupal\Core\Plugin\Context\Context @group Plugin

Namespace

Drupal\Tests\Core\Plugin\Context

Code

public function testSetContextValueTypedData() : void {
    $this->contextDefinition = $this->createMock('Drupal\\Core\\Plugin\\Context\\ContextDefinitionInterface');
    $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.