function ContextDefinitionTest::testDefaultValue
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php \Drupal\Tests\Core\Plugin\Context\ContextDefinitionTest::testDefaultValue()
- 10 core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php \Drupal\Tests\Core\Plugin\Context\ContextDefinitionTest::testDefaultValue()
- 11.x core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php \Drupal\Tests\Core\Plugin\Context\ContextDefinitionTest::testDefaultValue()
@covers ::getDefaultValue @covers ::setDefaultValue
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ Context/ ContextDefinitionTest.php, line 201
Class
- ContextDefinitionTest
- Tests the ContextDefinition class.
Namespace
Drupal\Tests\Core\Plugin\ContextCode
public function testDefaultValue() {
$context_definition = new ContextDefinition();
$this->assertNull($context_definition->getDefaultValue());
$context_definition->setDefaultValue('test');
$this->assertSame('test', $context_definition->getDefaultValue());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.