function StateTest::testSetBeforeGet

Tests get() method.

Here testing the key value right after we setting it with testSet() function.

@covers ::get

@depends testSet

Parameters

\Drupal\Core\State\State $state: The tested state.

File

core/tests/Drupal/Tests/Core/State/StateTest.php, line 248

Class

StateTest
@coversDefaultClass \Drupal\Core\State\State @group State

Namespace

Drupal\Tests\Core\State

Code

public function testSetBeforeGet(State $state) {
    $this->assertEquals('value', $state->get('key'));
}

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