27 $this->assertNull($state->getValueFor(
'invalid_key'));
31 #[\PHPUnit\Framework\Attributes\Depends('testGetNullValue')] 37 $this->assertEquals($value, $state->
getValueFor($key));
41 #[\PHPUnit\Framework\Attributes\Depends('testValue')] 44 $expected = json_encode([
'key' =>
'value'], JSON_THROW_ON_ERROR);
45 $this->assertEquals($expected, $state->
serialize());
48 #[\PHPUnit\Framework\Attributes\Depends('testValue')] 53 $expected = json_encode([
'keep' =>
'this'], JSON_THROW_ON_ERROR);
54 $this->assertEquals($expected, $state->
serialize());
withValueFor(string $key, string $value)
Set a value for a key of the state.
getValueFor(string $key)
Get the value for the given key.
testSerialize(State $state)
serialize()
Get the key-value store as string.
testRemoveValue(State $state)
withoutKey(string $key)
Remove the key-value-pair.