function ContextTest::testDefaultDataValue

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

@covers ::getContextData

File

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

Class

ContextTest
@coversDefaultClass \Drupal\Core\Plugin\Context\Context[[api-linebreak]] @group Plugin

Namespace

Drupal\Tests\Core\Plugin\Context

Code

public function testDefaultDataValue() : void {
  $this->setUpDefaultValue('test');
  $context = new Context($this->contextDefinition);
  $context->setTypedDataManager($this->typedDataManager);
  $this->assertEquals($this->typedData, $context->getContextData());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.