You are here

public function ContextTest::testNullDataValue in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php \Drupal\Tests\Core\Plugin\Context\ContextTest::testNullDataValue()
  2. 10 core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php \Drupal\Tests\Core\Plugin\Context\ContextTest::testNullDataValue()

@covers ::getContextData

File

core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php, line 78
Contains \Drupal\Tests\Core\Plugin\Context\ContextTest.

Class

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

Namespace

Drupal\Tests\Core\Plugin\Context

Code

public function testNullDataValue() {
  $this
    ->setUpDefaultValue(NULL);
  $context = new Context($this->contextDefinition);
  $context
    ->setTypedDataManager($this->typedDataManager);
  $this
    ->assertEquals($this->typedData, $context
    ->getContextData());
}