public function ContextDefinitionTest::testDefaultValue in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php \Drupal\Tests\Core\Plugin\Context\ContextDefinitionTest::testDefaultValue()
- 9 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());
}