function ContextTest::testSetContextValueTypedData

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

Tests set context value typed data.

File

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

Class

ContextTest
Tests Drupal\Core\Plugin\Context\Context.

Namespace

Drupal\Tests\Core\Plugin\Context

Code

public function testSetContextValueTypedData() : void {
  $this->contextDefinition = $this->createStub(ContextDefinitionInterface::class);
  $typed_data = $this->createStub(TypedDataInterface::class);
  $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.