function StateTest::testSetBeforeGet
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/State/StateTest.php \Drupal\Tests\Core\State\StateTest::testSetBeforeGet()
Tests get() method.
Here testing the key value right after we setting it with testSet() function.
@legacy-covers ::get
Attributes
#[Depends('testSet')]
Parameters
\Drupal\Core\State\State $state: The tested state.
File
-
core/
tests/ Drupal/ Tests/ Core/ State/ StateTest.php, line 238
Class
- StateTest
- Tests Drupal\Core\State\State.
Namespace
Drupal\Tests\Core\StateCode
public function testSetBeforeGet(State $state) : void {
$this->assertEquals('value', $state->get('key'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.